[Sean Perry]
>> And now, for the pedant in me. I would recommend against naming 
>> functions with initial capital letters. In many languages, this 
>> implies a new type (like your Water class). so 
>> CombineWater should be combineWater.

[Brian van den Broek]
> Do you mean implies by the dominant coding conventions, or 
> by language syntax? (Indulging the curious pedant in me.)

You might want to read PEP 8, which is the official recommendations for
Python code in terms of style.  A bit more than half way down there's a
"Naming Conventions" section which has this:

<http://www.python.org/peps/pep-0008.html>

"""
Modules should have short, lowercase names, without underscores.
[...]
Almost without exception, class names use the CapWords convention.
Classes for internal use have a leading underscore in addition.
[...]
Function names should be lowercase, possibly with words separated by
underscores to improve readability. 
"""

(BTW, 'CombineWater' should be 'combine_water', officially).

=Tony.Meyer

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to