[Tutor] Here's something to talk about
wesley chun
wescpy at gmail.com
Wed Apr 15 21:55:47 CEST 2009
>> i think it's a common style guideline in multiple
>> languages i'm familiar with (other than Python) to Capitalize class
>> names but keep variables, functions, and methods all lowered.
>
> In most cases I know, class names are capitalized, while func and method names are camel-cased:
> ThisKlass
this is indeed called "CamelCased".
> thisFunc
this is called "mixedCase". an all-lowered alternative is
"lower_case_with_underscores," as in 'this_func'. PEP8 seems to lean
towards the latter over the former, altho i use both and also do not
stay strict to it. here's the link if you're curious:
http://www.python.org/dev/peps/pep-0008/
cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall, (c)2009
http://corepython.com
wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
More information about the Tutor
mailing list