poll: does name conventions in python matters?

Peter Hansen peter at engcorp.com
Tue Apr 19 17:03:42 EDT 2005


vegetax wrote:
> in python it is common to see naming
> inconsistencies ,methods,modules,packages,classes with names in every
> posible style:
> thisisalongmethod
> ThisIsALongMethod
> thisIsALongMethod
> this_is_a_long_method
> and even This_Is_A_Long_Method
> All over the place,even within one module!

You certainly won't find most of those in a single
module, at least not in the standard library. You
might find a couple.  Check out the PEP(s) on the
topic, and just follow the conventions of whatever
code you are working with.

If you are working with new code and need to choose
something from scratch, go with your personal preference
and be consistent.

If all the above fail, use "names_like_this" or
"namesLikeThis".  If you really need somebody else
to tell you what to use: use the latter, because
I told you to. ;-)

-Peter



More information about the Python-list mailing list