Naming conventions

Chaz Ginger cginboston at hotmail.com
Wed Aug 30 08:19:12 EDT 2006


Neil Cerutti wrote:
> On 2006-08-30, Jean-Paul Calderone <exarkun at divmod.com> wrote:
>> On Wed, 30 Aug 2006 14:22:16 +1000, Ben Finney <bignose+hates-spam at benfinney.id.au> wrote:
>>> "glenn" <glenn at tangelosoftware.net> writes:
>>>
>>>> Bruno Desthuilliers wrote:
>>>>> It might be better to use newstyle classes if you can. Also, the
>>>>> convention is to use CamelCase for classes names (unless you have
>>>>> a strong reason to do otherwise).
>>> Note that this style is more correctly called TitleCase, since the
>> Or StudlyCaps :)
> 
> The first time I saw StudlyCaps I thought it was the ugliest
> thing I'd ever seen.  Now I use it a lot. I still have trouble
> with GVR's preference for HTTPServer over HttpServer. The latter
> is, to me, easier to read and write.
> 

Personally I think so long as you are consistent in your coding style, 
be it httpserver, HttpServer or HTTPServer or any other variation, the 
reader will soon figure out what it means.

If you feel you are being held hostage to capitalized naming conventions 
you might want to consider having things end in ...Class or ...Instance. 
At least you would be doing what you say you want to do: making the code 
more maintainable. Otherwise I say just be consistent and don't let 
dogma get in the way.

All those that remember "Hungarian notation" please stand up!



More information about the Python-list mailing list