Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74169

Naming conventions for functions and methods

From python@bdurham.com
Subject Naming conventions for functions and methods
Date 2014-07-08 10:59 -0400
Newsgroups comp.lang.python
Message-ID <mailman.11628.1404831576.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Naming conventions for functions and methods python@bdurham.com - 2014-07-08 10:59 -0400

csiph-web