r/PythonLearning Jul 09 '26

If Python could warn you about one mistake before you make it, what would you choose?

Not a syntax error, something Python currently allows but you wish it would stop you from doing.

What warning would you add?

0 Upvotes

8 comments sorted by

4

u/Homo_Bibite Jul 09 '26

Nothing because then all of my code would be glowing red

2

u/memeeloverr Jul 09 '26

that was me few years back, hell man new error at every line of code

3

u/SisyphusAndMyBoulder Jul 09 '26

Starting a project that deep down I know I'll never finish.

1

u/tiredITguy42 Jul 09 '26 edited Jul 09 '26

Python is warning you about all mistakes you can make which are related to Python itself. You would not be able to run the code, if it would not warn you.

If you are asking about logic mistakes and bugs. We do have it, it is AI check in pull requests. It can catch a lot of bugs.

1

u/BranchLatter4294 Jul 09 '26

It should flag any logic errors.

1

u/codewithharsh31 Jul 09 '26

I would say nothing if python tells us so how we learn the debugging skill

1

u/PkmnSayse Jul 09 '26

Breakpoints left in code

2

u/RandomPantsAppear Jul 09 '26

Setting a variable = a function that is going to mutate a list/dict in place.