Fire Method by predefined string!
Rick Johnson
rantingrickjohnson at gmail.com
Sun Nov 17 17:38:42 EST 2013
On Sunday, November 17, 2013 4:23:11 PM UTC-6, Rick Johnson wrote:
> 2. Never start a function or method with a lowercase letter.
> Please read PEP8
Urm... let me correct that:
2. Never start a function or method with a UPPERCASE letter.
Initial uppercase should be reserved for class names only --
and any number of leading underscores does not affect that
rule because underscores are not in the set [A-Za-z]!
You don't want these:
def __IllegalName
def _IllegalName
def IllegalName
But these are okay:
def __legalName
def _legalName
def legalName
These are preferred, however, i detest superfluous underscores!
def __legal_name
def _legal_name
def legal_name
More information about the Python-list
mailing list