True, False, None
Michele Simionato
mis6 at pitt.edu
Wed Nov 12 02:19:33 EST 2003
"Andrew Dalke" <adalke at mindspring.com> wrote in message news:<Klfsb.7716$nz.2382 at newsread2.news.pas.earthlink.net>...
> Douglas Alan:
> > Can someone remind me as to why [None, True, False] are
> > capitalized? They clash annoyingly with the common coding
> > convention that capitalizes only classes.
>
> Here's a conjecture -- those are singletons, and note that classes
> are singletons too.
>
> Andrew
> dalke at dalkescientific.com
Better to say: singletons are classes. But True and False are not
classes (no '__base__' attribute, for instance) so they are not
singletons.
I think using smallcaps would have been more consistent.
BTW, I would have been favorable to "Staticmethod", "Classmethod", "Super",
etc. since they are all classes. But it is useless to protest now :-(
Michele Simionato
More information about the Python-list
mailing list