On Jun 3, 11:03 pm, Thorsten Kampe <[EMAIL PROTECTED]> wrote:
> Okay,
>
> I hear you saying 'not another naming conventions thread'. I've read
> through Google and the 'naming conventions' threads were rather
> *spelling conventions* threads.
>
> I'm not interested in camelCase versus camel_case or anything
> mentioned in  'PEP 8 -- Style Guide for Python Code'. What I'm looking
> for is hints or ideas how to name your variables and especially how to
> name functions, methods and classes.

In my code:

* The most common form of a function/method name is verb_noun.  Other
common patterns are adjective_noun, noun_to_noun or noun2noun (for
conversions), and noun_of_noun.

* Classes nearly always have AdjectiveNoun names.

* Loop indices often have single-letter names (typically i/j/k or x/
y), or names that are the singular form of the list name (e.g., "for
ballot in self._ballots").  For iterating over files, I use "line".

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to