我正在寻找Python风格指南 [英] I'm searching for Python style guidelines

查看:55
本文介绍了我正在寻找Python风格指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

那里有很多蠢货。 算法应该有效编码

...谢谢,我会牢记这一点。


van Rossum的指导方针倾向于选择并坚持下去

这是好的,如果你有足够的经验来选择Pythonic。

我是一个相对新手,没有资格挑选。


任何写在某处的东西都是'彻底?任何应该作为参考的代码主体?

There''s a lot of dumb stuff out there. "Algorithms should be coded
efficiently ..." Thanks, I''ll keep that in mind.

van Rossum''s guidelines tend toward "pick something and stick to it"
which is OK if you have enough experience to pick something Pythonic.
I''m a relative newbie, not qualified to pick.

Anything written somewhere that''s thorough? Any code body that should
serve as a reference?

推荐答案

MartinRinehart写道:
MartinRinehart wrote:

任何在某处写得很彻底的东西?任何应该

的代码体作为参考?
Anything written somewhere that''s thorough? Any code body that should
serve as a reference?

http://www.python .org / dev / peps / pep-0008 /


2008/1/7, Ma ************ @ gmail.com < Ma ************ @ gmail .com>:
2008/1/7, Ma************@gmail.com <Ma************@gmail.com>:

那里有很多愚蠢的东西。 算法应该有效编码

...谢谢,我会牢记这一点。


van Rossum的指导方针倾向于选择并坚持下去

这是好的,如果你有足够的经验来选择Pythonic。

我是一个相对新手,没有资格挑选。


任何写在某处的东西都是'彻底?任何应该

的代码体作为参考?
There''s a lot of dumb stuff out there. "Algorithms should be coded
efficiently ..." Thanks, I''ll keep that in mind.

van Rossum''s guidelines tend toward "pick something and stick to it"
which is OK if you have enough experience to pick something Pythonic.
I''m a relative newbie, not qualified to pick.

Anything written somewhere that''s thorough? Any code body that should
serve as a reference?



PEP 8
http://www.python.org/dev/peps/pep-0008/


-
http://mail.python.org/mailman/listinfo/python -list



-

- Guilherme H. Polo Goncalves


--
-- Guilherme H. Polo Goncalves

谢谢你们两位。


愚蠢的我,去了Python.org并找到了样式指南并认为

这是最后一个字。哦,好吧。


PEP 8让我想起了很多Sun的Java惯例,我希望它能实现
。整体结构看起来像一个随机的主题列表和

它省略了很多。对于Java,我从Sun到其他约定尝试

来编译一个元约定( http://www.MartinRinehart.com/articl...nventions.html

)。


这里只是我的一个问题:


foo = [

''有些项目,很长'',

''更多的物品,都要求有自己的线,因为它们不短'',

...


你会把它放在哪里关闭'']''?
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/articl...nventions.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 '']''?


这篇关于我正在寻找Python风格指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆