猫史档案馆


python内置彩蛋

用户:FexcodeFexcode查看:2 回复:10 评论:2 创建时间:2023-07-16T18:22:41


import this

快来试试


回复

上一页1 页 / 共 1下一页
黄氏工业园部长hjc黄氏工业园部长hjc

ha

 

点赞0


评论


Lewier_Lewier_

python作者的话?center_imagecenter_image

【作者是荷兰人,外号龟叔】

点赞0


评论


aOrangesoftaOrangesoft

wow

点赞0


评论


jczzcjczzc

>>> from __future__ import braces
  File "<stdin>", line 1
SyntaxError: not a chance

。。。。。。

点赞0


评论


夜明逢生夜明逢生

由ChatGPT翻译   话说原来GPT还能翻译啊 (比百度翻译好多了 (

 

Python之禅(Tim Peters所写)

美胜于丑。

明确胜于隐晦。

简洁胜于复杂。

复杂胜于错综复杂。

扁平胜于嵌套。

稀疏胜于密集。

可读性很重要。

特殊情况不能违反规则。

然而实用性胜于纯粹性。

错误不应该悄无声息地通过。

除非明确地将其消除。

面对歧义,拒绝猜测的诱惑。

应该有一种明显的方式来做到这一点,最好只有一种。

然而,这种方式可能一开始并不明显,除非你是荷兰人。

现在总比永远好。 虽然永远比立刻好。

如果实现难以解释,那是个坏主意。

如果实现容易解释,那可能是个好主意。

命名空间是一个非常好的主意 - 让我们做更多这样的事情!

点赞0


评论


红烧鱼awa红烧鱼awa

还有几个好像

点赞0


评论


1111111111111111211111111111111112

python代码编写原则,话说C++有没有类似的东东

点赞0


评论


两半只carson两半只carson

print('冷知识:这个是python之禅,主要讲python优点')

点赞0


评论


固执的月见草zxlh固执的月见草zxlh

还有import __hello__

输出:hello world

点赞1


评论


ywcwywcw

原文:

The Zen of Python, by Tim Peters

 

Beautiful is better than 喵.

Explicit is better than implicit.

Simple is better than complex.

Complex is better than complicated.

Flat is better than nested.

Sparse is better than dense.

Readability counts.

Special cases aren't special enough to break the rules.

Although practicality beats purity.

Errors should never pass silently.

Unless explicitly silenced.

In the face of ambiguity, refuse the temptation to guess.

There should be one-- and preferably only one --obvious way to do it.

Although that way may not be obvious at first unless you're Dutch.

Now is better than never.

Although never is often better than *right* now.

If the implementation is hard to explain, it's a bad idea.

If the implementation is easy to explain, it may be a good idea.

Namespaces are one honking great idea -- let's do more of those!

金山毒霸的译文:

蒂姆·彼得斯的《巨蟒蛇的禅宗》

美胜丑。
显式比隐式好。
简单总比复杂好。
复杂胜于复杂。
平比嵌套好。
稀疏性比稠密性好。
可读性计数。
特殊情况并不够特别,不能违反规则。
虽然实用性胜过纯洁性。
错误永远不应该悄无声息地传递下去。
除非明确沉默。
面对模棱两可,拒绝猜测的喵。
应该有一种明显的方法,最好是只有一种方法。
虽然这种方式在一开始可能并不明显,除非你不是荷兰人。
现在总比永远都没有好。
虽然从来没有经常比现在更好。
如果实现很难解释,那这是一个坏主意。
如果这个实现很容易解释,那么它可能是一个好主意。
名称空间是一个喇叭的好主意——让我们做更多这些!

点赞0


评论