By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,629 Members | 1,222 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,629 IT Pros & Developers. It's quick & easy.

name capitalization of built-in types, True, and False

P: n/a
I see that naming conventions are such that classes usually get named
CamelCase. So why are the built-in types named all lowercase (like
list, dict, set, bool, etc.)?

And names for instances of classes are usually written in lowercase,
like foo in ``foo = CamelCase()``. So why are True and False
(instances of bool) capitalized? Shouldn't they be "true" and "false"?
Same goes for None.

May 11 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
cb******@gmail.com wrote:
I see that naming conventions are such that classes usually get named
CamelCase. So why are the built-in types named all lowercase (like
list, dict, set, bool, etc.)?

And names for instances of classes are usually written in lowercase,
like foo in ``foo = CamelCase()``. So why are True and False
(instances of bool) capitalized? Shouldn't they be "true" and "false"?
Same goes for None.
My guess is that TRUE, FALSE, and NONE are fairly unbecoming and all
lowercase would not do justice to their status as language constants.
May 12 '07 #2

P: n/a
En Fri, 11 May 2007 17:37:48 -0300, <cb******@gmail.comescribió:
I see that naming conventions are such that classes usually get named
CamelCase. So why are the built-in types named all lowercase (like
list, dict, set, bool, etc.)?
Because most of them originally were types and factory functions, not
classes - and a naming convention is not a strong reason to make backwards
incompatible changes.
A different example: the new builtin type `set` is based on (altough not
exactly equal to) the Set class from the sets module

--
Gabriel Genellina

May 12 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.