On 8 July 2014 15:59, <pyt...@bdurham.com> wrote: > > 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
If you want to group related functions together, I would suggest putting them in a module, e.g. 'fileutils'. I'd still go for hashfile for the function name though. -- Arnaud -- https://mail.python.org/mailman/listinfo/python-list