更改姓名以保护有罪 [英] Names changed to protect the guilty

查看:64
本文介绍了更改姓名以保护有罪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在公开的可用的Python库中找到以下轻微代码行......


if schema.elements.has_key(key)是假的:


对不起,只需要发泄。

-

Aahz(aa**@pythoncraft.com) < * http://www.pythoncraft.com/


如果你不知道你的节目应该做什么,你最好不要开始写它的b $ b。 --Dijkstra

The following line of lightly munged code was found in a publicly
available Python library...

if schema.elements.has_key(key) is False:

Sorry, just had to vent.
--
Aahz (aa**@pythoncraft.com) <* http://www.pythoncraft.com/

"If you don''t know what your program is supposed to do, you''d better not
start writing it." --Dijkstra

推荐答案




10月6日下午6:27,... ... pythoncraft.com(Aahz)写道:


On Oct 6, 6:27 pm, a...@pythoncraft.com (Aahz) wrote:

在公开的可用Python库中找到以下轻微代码行......
The following line of lightly munged code was found in a publicly
available Python library...



是的,这违反了神圣的,灵感的,无懈可击的风格指南(pbuh),

这是由上帝的指头所写的世界仍然处于混乱的黑暗之中。但是我想在PEP 8时我是一个无神论者。如果

你更明确地让条件明确(blah not False),

而不是隐含(不是blah),然后使用前者。我说用*你*(以及你的团队,如果适用)最好能够阅读的方式写

代码,

编写并维护它。然后当别人告诉你它不是好的风格,或者不是pythonic时,只用他们的脸砸了他们的脸。

烙铁ala Chris Walken。 :)


问候,

乔治

Yes, this violates the Holy, Inspired, Infallible Style Guide (pbuh),
which was written by the very finger of God when the world was still in
chaotic darkness. But I guess I''m an atheist when it comes to PEP 8. If
it is clearer to you to make the condition explicit ("blah not False"),
rather than implicit ("not blah"), then use the former. I say write the
code the way *you* (and your team if applicable) are best able to read,
write and maintain it. Then when other people tell you that it isn''t
good style, or isn''t "pythonic," just stab them in the face with
soldering iron ala Chris Walken. :)

Regards,
Jordan





10月6日晚上8点02分,MonkeeSage < MonkeeS ... @ gmail.comwrote:


On Oct 6, 8:02 pm, "MonkeeSage" <MonkeeS...@gmail.comwrote:

你可以更清楚地明确条件(blah not False),
it is clearer to you to make the condition explicit ("blah not False"),



" blah not False" - blah is False

"blah not False" -"blah is False"


2006-10-07,MonkeeSage< Mo ******** @ gmail.comwrote:
On 2006-10-07, MonkeeSage <Mo********@gmail.comwrote:

>


10月6日下午6:27,a ... @ pythoncraft.com(Aahz)写道:
>

On Oct 6, 6:27 pm, a...@pythoncraft.com (Aahz) wrote:

>在公开可用的Python库中找到以下轻微代码行...
>The following line of lightly munged code was found in a
publicly available Python library...



是的,这违反了神圣的,灵感的,无懈可击的风格指南

(pbuh),这是由上帝的手指写的

世界仍处于混乱的黑暗中。但是当我谈到PEP 8时,我想我是无神论者

。如果你更清楚地明确

条件(blah not False) ),而不是隐含的

(不是blah),然后使用前者。我说写代码的方式

*你*(和你的团队,如果适用)最好能读,

写和维护它。然后,当其他人告诉你它时,b $ b不是好风格,或者不是pythonic,用烙铁克拉·沃肯(Chris Walken)将它们刺入

面。 :)


Yes, this violates the Holy, Inspired, Infallible Style Guide
(pbuh), which was written by the very finger of God when the
world was still in chaotic darkness. But I guess I''m an atheist
when it comes to PEP 8. If it is clearer to you to make the
condition explicit ("blah not False"), rather than implicit
("not blah"), then use the former. I say write the code the way
*you* (and your team if applicable) are best able to read,
write and maintain it. Then when other people tell you that it
isn''t good style, or isn''t "pythonic," just stab them in the
face with soldering iron ala Chris Walken. :)



我同意这两点。这是一个风格问题,隐藏的测试

(利用某些对象如何转换为boolian

值)更难以阅读。


-

Neil Cerutti

I agree on both points. It''s a style issue, and that hidden tests
(taking advantage of how certain objects convert to boolian
values) is harder to read.

--
Neil Cerutti


这篇关于更改姓名以保护有罪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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