[Tutor] syntax error that i cant spot!

Hugo Arts hugo.yoshi at gmail.com
Sun Jan 2 15:59:29 CET 2011


On Sun, Jan 2, 2011 at 3:40 PM, Brett Ritter <swiftone at swiftone.org> wrote:
> On Sat, Jan 1, 2011 at 9:10 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
>> Why avoidCamelCase? I actually prefer it to using_non_camel_case
>
> The readability is an often argued topic - I myself find the space of
> names_in_underscores to be more readable (words are distinct), but I
> try to follow the common conventions of the languages I'm using, and
> Python appears to use camelCase more than not.
>

according to PEP 8, python doesn't use camelCase (mixedCase, as they
call it) at all. Or shouldn't, in any case. No pun intended.

For classnames you should use CapWords. The only difference with
camelCase is the initial character. variable and function names should
use lower_case_with_underscores.

Hugo


More information about the Tutor mailing list