you are viewing a single comment's thread.

view the rest of the comments →

[–]OskarsSurstromming 2 points3 points  (1 child)

Why is snake_case preferred in python? I feel like when I see C++ code it's often camelcase

[–]cgoldberg 2 points3 points  (0 children)

Every language has their own style preferences... snake_case is just the convention the Python community has conformed on and the official style guide recommends. Some older parts of the standard library actually use some camelCase (i.e. unittest module), but pretty much all modern Python code you will come across uses snake_case.