I'm searching for Python style guidelines
Guilherme Polo
ggpolo at gmail.com
Mon Jan 7 11:19:48 EST 2008
2008/1/7, MartinRinehart at gmail.com <MartinRinehart at gmail.com>:
> Thank you both.
>
> Stupid me, went to Python.org and found Style Guidelines and thought
> that was the last word. Oh well.
>
> PEP 8 reminds me a lot of Sun's Java conventions, in ways I wish it
> didn't. The overall structure seems like a random list of topics and
> it omits a lot. For Java I went from Sun to other conventions to try
> to compile a meta-convention ( http://www.MartinRinehart.com/articles/code-conventions.html
> ).
>
> Here's just one of my questions:
>
> foo = [
> 'some item, quite long',
> 'more items, all demanding there own line as they are not short',
> ...
>
> Where would you put the closing ']'?
I would put ']' at a new line:
foo = [
'too long',
'too long too',
...
]
I don't really believe it should exist style guidelines for everything
that is possible (or if it did I doubt it would matter), many/most
people adapt the guidelines to fetch their own style. That is not
really a problem if you are consistent during all the code, and if it
is not too ugly as well =)
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
-- Guilherme H. Polo Goncalves
More information about the Python-list
mailing list