[Tutor] syntax error that i cant spot!

Alan Gauld alan.gauld at btinternet.com
Sun Jan 2 16:52:07 CET 2011


"Corey Richardson" <kb1pkl at aim.com> 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
>>
>> Python appears to use camelCase more than not.
>>
>
> I tend to disagree with that. In the stdlib, as well as the 
> builtins,
> many, many methods are alllowercase, for example str.isdigit() or
> socket.gethostname().

Which should, according to PEP8, be get_hostname()(*) and
is_digit()...

The stdlib is a mess of inconsistency. I assume that's why PEP8
seems to get more attention these days - it's been around for ages.
Some modules use CamelCase, some use underscores and
some just use long lowercase names (the worst option! - well
apart from all uppercase like COBOL...!)

(*)hostname could be host_name I guess but Unix tradition
spells it as one word so I've followed that convention...

Alan G 




More information about the Tutor mailing list