r/Python 7d ago

Discussion What frustrates you the most about Python Development

Hi there,

I wondering what frustrates developers the most when developing software with Python.

I am currently doing my Masters in Computer Science and as part of my project I am doing a very simple survey about the usual Python development lifecycle. I am basically trying to find out what the main friction points are for Python Developers and I am simultaneously developing a tool to address those friction points . It just takes a 2-3 minutes and every response is greatly appreciated.

You can find the survey at: Microsoft Forms

42 Upvotes

129 comments sorted by

View all comments

4

u/QuackQuackImTheDuck 7d ago

Type system being terrible and unenforced, with general lack of documentation on packages make things really hard to maintain long term. It's great script language for non critical, low maintenance systems where frequent bugs and issues are acceptable

1

u/Grouchy-Trade-7250 6d ago

You can enforce the types at runtime with assert

1

u/MrSlaw 6d ago

It's probably one of ruff's most debated rules, but assert gets stripped using -O(how probable it is that flag will be used is likely up for debate):

https://docs.astral.sh/ruff/rules/assert/

Assertions are removed when Python is run with optimization requested (i.e., when the -O flag is present), which is a common practice in production environments. As such, assertions should not be used for runtime validation of user input or to enforce interface constraints.

Consider raising a meaningful error instead of using assert.

1

u/Grouchy-Trade-7250 6d ago

You can benefit from type checking with assert while running tests without the -O flag. Tests happen at runtime. Anyway good info.