Naming conventions for functions and methods

python at python at
Tue Jul 8 16:59:18 CEST 2014

Looking for your opinions on how you name your functions and
methods. Example: I have a function that hashes a file. I could
name this function hash_file() or file_hash(). The 1st naming
convention sounds more natural, the 2nd naming convention
allows one to group related functions together by the object
being acted on. PEP-8 doesn't appear to offer guidance in this
area. Thoughts? Malcolm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list