[Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

Ranting Rick rantingrickjohnson at gmail.com
Tue Dec 25 00:10:03 EST 2012


On Dec 24, 9:48 am, Dave Angel <d... at davea.name> wrote:
> Pep8 recommends a particular style within a function name, separating
> 'words of a name by underscore.  I happen to loathe that style, so I'm
> clearly not the one who would critique someone for not following the
> guideline.  I say getFile(), the pep says  get_file().

Slightly off topic, but still quite relevant: I happen to like that
style for public methods (even though Python has no real public/
private methods).

class Foo():
    def __init__(self)
    def __secretMethod() # Secret handshake required!
    def _privateMethodOrAccessor() # Self only.
    def sharedMethod() # Self and/or descendants only.
    def public_method() # Total whore.



More information about the Python-list mailing list