1/ Many will tell you why Python is great for teaching coding, so I'll tell you ways it's not.
State is a bad default. It should be legal but safe & rare. The arc of programming is long and bends towards immutability. Its early use creates messes (eg, "a variable is a box".)
2/ Rich and robust programming requires a strong understanding of data models and invariants. Python is weak at expressing either of those. You don't notice it until you miss it. ↵
3/ Mutation is not the same as binding, and variable is not the same as structure mutation. Python uses the same syntax for all three. This leads to confusion over concepts that are important, subtle, and should be clearly distinguished.
4/ Types matter. Annotations matter. Types can be gradual; indeed, there's a strong argument for that. Annotation-checking can be dynamic. But this must be baked into the language. Annotations should not just be ignored. ↵
@shriramk seems like a good thread to port over this doozy from Twitter.
“here's possibly the worst Python scoping rule I've ever seen.”
Try for yourself at https://replit.com/@elfprince13/RubberyFortunateCables#main.py
@elfprince13 @shriramk I am not surprised. Just disappointed.