Coding conventions for class names
Michael Hoffman
cam.ac.uk at mh391.invalid
Wed Apr 25 07:27:23 EDT 2007
Marc 'BlackJack' Rintsch wrote:
> In <1177492705.232244.312520 at c18g2000prb.googlegroups.com>, Kay Schluehr
> wrote:
>
>> set, int, float, list, object,...
>>
>> Don't see any of the basic types following the capitalized word
>> convention for classes covered by PEP 08. This does not hold only for
>> __builtins__ in the strict sense but also for types defined in builtin
>> modules like datetime.
>
> Most built-ins are easy to explain: They were functions long before it
> was possible to use them as base classes and stayed lowercase for
> backwards compatibility. Don't know about `set` and `object`. I guess
> it's foolish consistency!?
Well originally there was sets.Set (uppercase). It became set when it
went to being a built-in.
--
Michael Hoffman
More information about the Python-list
mailing list