[Tutor] Should this be a list comprehension or something?

Alan Gauld alan.gauld at freenet.co.uk
Thu Jan 27 11:05:11 CET 2005


> > functions with initial capital letters. In many languages, this
implies
> > a new type (like your Water class). so CombineWater should be
combineWater.
>
> Do you mean implies by the dominant coding conventions, or by
language
> syntax? (Indulging the curious pedant in me.)

Coding convention. Its like using UPPERCASE for constants.
If you see a name captalised it means is a class not a function.

Python doesn't care but it makes it more readable.
And its a convention that started in Smalltalk (I believe) but has
spread to most OO languages.

Alan G.



More information about the Tutor mailing list