list as an instance attribute
Robin Becker
robin at reportlab.com
Mon Sep 14 04:55:18 EDT 2009
Bruno Desthuilliers wrote:
> Daniel Santos a écrit :
>> Here goes,
>>
>> I have a base class that is the following :
>>
>> class primitive:
>
> pep08 : class names should be Capitalized.
>
> Also, if you're using Python 2.x, make it:
>
> class Primitive(object):
> #...
>
.......
I find it remarkable that the most primitive classes appear to break the pep08
convention eg object, str, list etc etc. In fact all such conventions appear to
be broken more often than not. So the rule appears to be "create a convention
and then break it" :)
Python is often put forward as a as a finger friendly language, but we have
capitals encouraged for user class names and for some common values eg None,
True, False these are required.
--
Robin Becker
More information about the Python-list
mailing list