Naming conventions for functions and methods

python at bdurham.com python at bdurham.com
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: <http://mail.python.org/pipermail/python-list/attachments/20140708/cd936f48/attachment.html>


More information about the Python-list mailing list