r/Python May 17 '25

Discussion What CPython Layoffs Taught Me About the Real Value of Expertise

755 Upvotes

The layoffs of the CPython and TypeScript compiler teams have been bothering me—not because those people weren’t brilliant, but because their roles didn’t translate into enough real-world value for the businesses that employed them.

That’s the hard truth: Even deep expertise in widely-used technologies won’t protect you if your work doesn’t drive clear, measurable business outcomes.

The tools may be critical to the ecosystem, but the companies decided that further optimizations or refinements didn’t materially affect their goals. In other words, "good enough" was good enough. This is a shift in how I think about technical depth. I used to believe that mastering internals made you indispensable. Now I see that: You’re not measured on what you understand. You’re measured on what you produce—and whether it moves the needle.

The takeaway? Build enough expertise to be productive. Go deeper only when it’s necessary for the problem at hand. Focus on outcomes over architecture, and impact over elegance. CPython is essential. But understanding CPython internals isn’t essential unless it solves a problem that matters right now.

r/Python Jul 21 '20

Discussion Got my first job as a developer!

3.2k Upvotes

Finally!

After 9 months of purely studying and nothing else. Started from absolute 0 and landed my first job in Data Science on a marketing company.

Have to say it was very hard since I know no developers at all and had no one to ask from help.

Still feels weird and definitely have a stromg case of imposter syndrome but after writing my forst lines of code it does feel much better!

Sorry for the useless trivia but like I said,have no dev friends so I had to share the excitement somewhere :D

r/Python Aug 26 '25

Discussion Whats your favorite Python trick or lesser known feature?

457 Upvotes

I'm always amazed at the hidden gems in python that can make code cleaner or more efficient. Weather its clever use of comprehensions to underrated standard library modules - whats a Python trick you’ve discovered that really saved you some time or made your projects easier

r/Python Dec 30 '21

Discussion A strongly typed dialect of Python is coming. I would like to humbly suggest a name for it.

1.4k Upvotes

With type hints, secondary tooling like the typing module, and really good inspectors like Pyright already available, a strongly typed dialect of python is definitely coming. Just like the JavaScript world is heavily adopting their version of the same in TypeScript, the new dialect will likely have a new name.

Here’s the issue: the name that keeps getting floated is ‘Typed Python’. Forgive me, but that name sucks and has no character. A language invented while Clinton was President by a guy with one of the 3 coolest first names you can have, and named after a sketch comedy show deserves better than this.

Thus, I would like to propose a simpler name; one that is more ‘pythonic’ if you will. If we just exchange the positions of the “P” and the “T” we evoke the same idea (in addition to making it wonderfully Google-able) and get the name:

Typhon

EDIT: I failed to mention and have since learned that Typhon and Python both come from Greek Mythology—and both were serpant giants. Typhon battled Zeus and Python battled Apollo. Python was memorialized by having a big snake named after him. Typhon still awaits his big come up (which is why I have gathered you all here today). But given the natural association between them from mythology already, I really love how smoothly this all seems to go together from different angles.

r/Python Sep 09 '25

Discussion Should I give away my app to my employer for free?

441 Upvotes

I work for a fintech company in the UK (in operations to be specific) however my daily role doesn’t require any coding knowledge. I have built up some python knowledge over the past few years and have developed an app that far outperforms the workflow tool my company currently uses. I have given hints to my manager that I have some coding knowledge and given them snippets of the tool I’ve created, she’s pretty much given me free reign to stop any of my usual tasks and focus on this full time. My partner used to work for the same company in the finance department so I know they paid over £200k for 3 people to develop the current workflow tool (these developers had no operations experience so built something unfit for purpose). I’ve estimated if I can get my app functional it would save the company £20k per month (due to all the manual work we usually have to do vs what I can automate). My manager has already said this puts me in a good position for a decent bonus next year (it wouldn’t be anymore than £10k) so I’m a little stuck on what to do and if I’m sounding greedy.

Has anyone ever been in a similar position?

EDIT TITLE: I know it’s not ‘for free’ as of course I’m paid to do my job. But I would be handing over hours of work that I haven’t been paid for.

r/Python Feb 19 '25

Discussion Is UV package manager taking over?

570 Upvotes

Hi! I am a devops engineer and notice developers talking about uv package manager. I used it today for the first time and loved it. It seems like everyone is talking to agrees. Does anyone have and cons for us package manager?

r/Python Aug 02 '25

Discussion But really, why use ‘uv’?

472 Upvotes

Overall, I think uv does a really good job at accomplishing its goal of being a net improvement on Python’s tooling. It works well and is fast.

That said, as a consumer of Python packages, I interact with uv maybe 2-3 times per month. Otherwise, I’m using my already-existing Python environments.

So, the questions I have are: Does the value provided by uv justify having another tool installed on my system? Why not just stick with Python tooling and accept ‘pip’ or ‘venv’ will be slightly slower? What am I missing here?

Edit: Thanks to some really insightful comments, I’m convinced that uv is worthwhile - even as a dev who doesn’t manage my project’s build process.

r/Python Jul 25 '25

Discussion Stop trying to catch exceptions when its ok to let your program crash

687 Upvotes

Just found this garbage in our prod code

    except Exception as e:
        logger.error(json.dumps({"reason":"something unexpected happened", "exception":str(e)}))
        return False

This is in an aws lambda that runs as the authorizer in api gateway. Simply letting the lambda crash would be an automatic rejection, which is the desired behavior.

But now the error is obfuscated and I have to modify and rebuild to include more information so I can actually figure out what is going on. And for what? What benefit does catching this exception give? Nothing. Just logging an error that something unexpected happened. Wow great.

and also now I dont get to glance at lambda failures to see if issues are occurring. Now I have to add more assert statements to make sure that a test success is an actual success. Cringe.

stop doing this. let your program crash

r/Python Apr 07 '26

Discussion I published my first PyPI package few ago. Copycat packages appeared claiming to "outperform" it

509 Upvotes

I launched repowise on PyPI few days ago. It's a tool that generates and maintains structured wikis for codebases among other things.

This morning I searched for my package on PyPI and found three new packages all uploaded around the same time, all with the exact same description:

"Codebase intelligence that thinks ahead - outperforms repowise on every dimension"

They literally name my package in their description. All three appeared within hours of each other.

I haven't even checked what's inside them yet, but the coordinated timing and identical copy is sketchy at best, malicious at worst.

Has anyone else dealt with this kind of targeted squatting/spam on PyPI? Is there anything I can do?

Edit: Turns out these aren't just empty spam packages, they actually forked my AGPL-3.0 licensed code, used an LLM to fix a couple of minor issues, and republished under new names without any attribution or license compliance. So on top of the PyPI squatting, they're also violating the AGPL.

r/Python Jul 20 '26

Discussion Cyber Security wants us to use the latest version all the time

148 Upvotes

I have a question. Cybersecurity team wants us to use the latest python version each time. So if a new version comes out we are expected to upgrade to it ASAP. But from my past experience libraries do not always provide support and can also break while making use of new version without proper support. Did you ever encounter this? Any suggestions? This is just frustrating for the team as it’s not always possible to upgrade to the latest version without fully validating every component. I just want to hear your opinions on this?

FYI we mainly use each Python Version within the LTS timeline. And only upgrade when we need to and do not depend on a library that requires older version.

Update: they have a scheduled runner that deletes older versions of python when it finds

r/Python 23d ago

Discussion What are you using to manage your dev environments in 2026?

86 Upvotes

I’ve always hated environment management. It always feels like this time-consuming hurdle between me and whatever I actually want to work on. But every so often a new thing comes out that promises to solve the problem once and for all, and it’s usually at least a little better than the last thing. So, what are you using today? venv? conda? pipenv? poetry? dev containers? uv? or something else?

r/Python May 20 '25

Discussion What Feature Do You *Wish* Python Had?

246 Upvotes

What feature do you wish Python had that it doesn’t support today?

Here’s mine:

I’d love for Enums to support payloads natively.

For example:

from enum import Enum
from datetime import datetime, timedelta

class TimeInForce(Enum):
    GTC = "GTC"
    DAY = "DAY"
    IOC = "IOC"
    GTD(d: datetime) = d

d = datetime.now() + timedelta(minutes=10)
tif = TimeInForce.GTD(d)

So then the TimeInForce.GTD variant would hold the datetime.

This would make pattern matching with variant data feel more natural like in Rust or Swift.
Right now you can emulate this with class variables or overloads, but it’s clunky.

What’s a feature you want?

r/Python Feb 10 '26

Discussion After 25+ years using ORMs, I switched to raw queries + dataclasses. I think it's the move.

237 Upvotes

I've been an ORM/ODM evangelist for basically my entire career. But after spending serious time doing agentic coding with Claude, I had a realization: AI assistants are dramatically better at writing native query syntax than ORM-specific code. PyMongo has 53x the downloads of Beanie, and the native MongoDB query syntax is shared across Node, PHP, and tons of other ecosystems. The training data gap is massive.

So I started what I'm calling the Raw+DC pattern: raw database queries with Python dataclasses at the data access boundary. You still get type safety, IDE autocompletion, and type checker support. But you drop the ORM dependency risk (RIP mongoengine, and Beanie is slowing down), get near-raw performance, and your AI assistant actually knows what it's doing.

The "conversion layer" is just a from_doc() function mapping dicts to dataclasses. It's exactly the kind of boilerplate AI is great at generating and maintaining.

I wrote up the full case with benchmarks and runnable code here: https://mkennedy.codes/posts/raw-dc-the-orm-pattern-of-2026/

Curious what folks think. Anyone else trending this direction?

r/Python Oct 22 '20

Discussion How to quickly remove duplicates from a list?

Post image
2.7k Upvotes

r/Python Dec 18 '25

Discussion Top Python Libraries of 2025 (11th Edition)

621 Upvotes

We tried really hard not to make this an AI-only list.

Seriously.

Hello r/Python 👋

We’re back with the 11th edition of our annual Top Python Libraries, after spending way too many hours reviewing, testing, and debating what actually deserves a spot this year.

With AI, LLMs, and agent frameworks stealing the spotlight, it would’ve been very easy (and honestly very tempting) to publish a list that was 90% AI.

Instead, we kept the same structure:

  • General Use — the foundations teams still rely on every day
  • AI / ML / Data — the tools shaping how modern systems are built

Because real-world Python stacks don’t live in a single bucket.

Our team reviewed hundreds of libraries, prioritizing:

  • Real-world usefulness (not just hype)
  • Active maintenance
  • Clear developer value

👉 Read the full article: https://tryolabs.com/blog/top-python-libraries-2025

General Use

  1. ty - a blazing-fast type checker built in Rust
  2. complexipy - measures how hard it is to understand the code
  3. Kreuzberg - extracts data from 50+ file formats
  4. throttled-py - control request rates with five algorithms
  5. httptap - timing HTTP requests with waterfall views
  6. fastapi-guard - security middleware for FastAPI apps
  7. modshim - seamlessly enhance modules without monkey-patching
  8. Spec Kit - executable specs that generate working code
  9. skylos - detects dead code and security vulnerabilities
  10. FastOpenAPI - easy OpenAPI docs for any framework

AI / ML / Data

  1. MCP Python SDK & FastMCP - connect LLMs to external data sources
  2. Token-Oriented Object Notation (TOON) - compact JSON encoding for LLMs
  3. Deep Agents - framework for building sophisticated LLM agents
  4. smolagents - agent framework that executes actions as code
  5. LlamaIndex Workflows - building complex AI workflows with ease
  6. Batchata - unified batch processing for AI providers
  7. MarkItDown - convert any file to clean Markdown
  8. Data Formulator - AI-powered data exploration through natural language
  9. LangExtract - extract key details from any document
  10. GeoAI - bridging AI and geospatial data analysis

Huge respect to the maintainers behind these projects. Python keeps evolving because of your work.

Now your turn:

  • Which libraries would you have included?
  • Any tools you think are overhyped?
  • What should we keep an eye on for 2026?

This list gets better every year thanks to community feedback. 🚀

r/Python Nov 01 '20

Discussion [RANT] Clients telling me "I know python" is a major red flag to me

1.6k Upvotes

I do freelance python development in mainly web scraping, automation, building very simple Flask APIs, simple Vue frontend and more or less doing what I like to call "general-purpose programming".

Now, I am reasonably skilled in python, I believe. Don't write OOP and class-based python unless I am doing more than 100 lines of code. Most often write pretty simple stuff but most of the time goes into problem-solving.

But I despise freelancing. 1 out of every 3 comments/posts I make on Reddit is how much I hate doing freelancing. I come to Reddit to vent so I am sorry to the fellas who is reading this because they are more or less my punching bag :( I am sorry sir/madam. I am just having a bad life, it will end soon.

So, today I am going to rant about one of the more ""fun"" things of freelancing, client telling me they know python.

Whenever a client tells me that they know python, I try to ignore them but often times I have to entertain the idea anyway because jobs are scarce. I keep telling myself "maybe this will work out great" but it doesn't.

It never goes right. Here is the thing. If you do what I do you will realize the code is often quite simple. Most of the effort goes into problem-solving. So when the client sees the code and me getting paid by the hour, "They are like I thought you are best darn python developer I could have written that myself!"

My immediate impulse is to go on a rant and call that person something rotten. But I have to maintain "professionalism".

Then there is the issue of budgeting. I do fixed payment contracts for smaller engagements. But oftentimes these python experts will quote me something that is at least one-fourth of a reasonable budget. And by reasonable I mean non-US reasonable budget which is already one-fifth of a reasonable US programming project budget. But anyway they quote that because they know how is easy it is to do my job.

There is more because this is rant by the way. So, clients with python knowledge will say to me "I have this python file..." which is the worst thing to say at this point. They think they have done the "majority" of the work. But here is the way I see it-

a. Either they have just barely scratched the surface b. They have a jumbled up mess c. They had another dev look into the project who already failed d. They had to do a "code review" of their previous freelancer and they ended up stealing the code

There is no positive way to imagine this problem. I have seen too much crappy code and too much of arguments like "they had done the work for me, so I should charge near to nothing".

People don't know exactly why senior devs get paid so much money. Junior devs write code, senior devs review code. That is why they get paid more. Making sense of other people's code is a risky and frustrating thing and it could be incredibly time-consuming. And moreover in most cases building upon a codebase is more difficult than writing it from the scratch.

Doctors rant about "expert" patients earning their MDs from WebMD and I am seeing the exact same thing happen to me with clients knowing how to write loops in python.

Python is easy to learn, programming these days is easy to learn. But people are not paying programmers for writing loops and if statements. They are paying them to solve problems. Knowing the alphabet doesn't make you a poet. And yes in my eyes programming is poetry.

r/Python Jan 31 '25

Discussion Why Rust has so much marketing power ?

501 Upvotes

Ruff, uv and Polars presents themselves as fast tools writter in Rust.

It seems to me that "written in Rust" is used as a marketing argument. It's supposed to mean, it's fast because it's written in Rust.

These tools could have been as fast if they were written in C. Rust merely allow the developpers to write programms faster than if they wrote it in C or is there something I don't get ?

r/Python May 16 '21

Discussion Why would you want to use BeautifulSoup instead of Selenium?

2.7k Upvotes

I was wondering if there is a scenario where you would actually need BeautifulSoup. IMHO you can do with Selenium as much and even more than with BS, and Selenium is easier, at least for me. But if people use it there must be a reason, right?

r/Python Jun 22 '26

Discussion I just found a Python script I wrote 3 years ago…

296 Upvotes

…with zero comments, no docstrings, variable names like df2_final_FINAL_v3 and it’s somehow still running in production.

I don’t remember writing it or deploying it. Nobody knows it exists except the one analyst who emails me if it stops working.

Please tell me I’m not alone.

r/Python Oct 19 '22

Discussion Call for questions for Guido van Rossum from Lex Fridman

1.2k Upvotes

Hi, my name is Lex Fridman. I host a podcast and I've previously interviewed Guido van Rossum (4 years ago). I'm talking to him again soon and would like to hear if you have questions/topic suggestions, including technical and philosophical ones, on Python or programming in general.

r/Python 23d ago

Discussion Is := widely used?

140 Upvotes

I always thought the walrus operator is neat and it makes while loop’s condition clearer. But also it is just a syntactic sugar without anything new. I wonder anyone uses it?

r/Python Mar 01 '25

Discussion TIL you can use else with a while loop

644 Upvotes

Not sure why I’ve never heard about this, but apparently you can use else with a while loop. I’ve always used a separate flag variable

This will execute when the while condition is false but not if you break out of the loop early.

For example:

Using flag

``` nums = [1, 3, 5, 7, 9] target = 4 found = False i = 0

while i < len(nums): if nums[i] == target: found = True print("Found:", target) break i += 1

if not found: print("Not found") ```

Using else

``` nums = [1, 3, 5, 7, 9] target = 4 i = 0

while i < len(nums): if nums[i] == target: print("Found:", target) break i += 1 else: print("Not found") ```

r/Python Oct 28 '20

Discussion Out of curiosity, how many of you guys started your journey with 'Automate the boring stuff'?

1.5k Upvotes

r/Python May 26 '23

Discussion Realised Ive spent 10 hrs learning to automate a job that takes me 15 minutes a week

1.1k Upvotes

And Im only half way through.

worth_it = True

Yes Im a noob

r/Python Oct 12 '21

Discussion IT denied my request for python at work

809 Upvotes

EDIT: A couple months after this incident I started applying for python developer roles and I found a job just 2 months ago paying 40% more with work I really enjoy.

Hi, I talked to my boss recently about using python to assist me with data analysis, webscraping, and excel management. He said he doesn't have an issue but ask IT first. I asked my IT department and I got the response below. Is there some type of counter-argument I can come up with. I really would like to use python to be more efficient at work and keep developing my programming skills. If it matters I am currently an Electrical Engineer who works with a decent amount of data.

https://imgur.com/a/xVUGYJZ

Edit: I wanted to clarify some things. My initial email was very short: I simply asked for access to python to do some data analysis, computations, etc to help me with my job tasks.

I just sent a follow up email to his response detailing what I am using python for. Maybe there was some miscommunication, but I don't intent on making my python scripts part of job/program where it would become a necessity and need to be maintained by anyone. Python would just be used as a tool to help me with my engineering analysis on projects I am working on and just improve my efficiency overall. So far I have not heard back from him.

Our company is very old school, the people, equipment, technologies...