PEP318 [英] PEP318

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

问题描述

Arthur写道:

无论是直觉上,还是有意识地,他都在做一些事情,将其从真正融入<核心的东西中抵消。语言。通过打破他自己的所有规则。
And either intuitively, or consciously, he is doing something that
offsets it from something truly intergrated into the core of the
language. By breakling all of his own rules.


但它*不是*核心语言的一部分。我认为这就是整个问题。 @decorator做了Python中没有其他语句做的事情,
那么为什么它看起来*像一个普通的语句?或者您是否建议使用关键字而不是符号?
我不能理解你的论点。

But it *isn''t* part of the core language. I think that''s the whole
point. @decorator does something that no other statement in Python does,
so why should it *look* like a normal statement? Or are you suggesting
that a keyword should be used instead of a symbol? I must not understand your argument.




我不是在争论。我在推测。


PEP318的设计目标包括:


"""

明确发生的事情;至少应该很明显,新用户在编写自己的代码时可以放心地忽略它

"""


我是支持(我猜)该设计目标,但我想我猜测

实际决定语法可能会有所不同,如果这不是

已经设计目标。关于语法的很多讨论似乎没有考虑到这个特定的设计目标以及它如何影响Gudio的决定。


Art



I''m not making an argument. I''m speculating.

The design goals of PEP318 include:

"""
make it obvious what is happening; at the very least it should be obvious that new users can safely ignore it when writing their own code
"""

I''m supportive (I guess) of that design goal, but I guess I am speculating that
the actual decision as to the syntax might have been different had this not
have been among the design goals. And that a lot of the discussion regarding the syntax seems to not take consideration of this particular design goal and how it might have impacted Gudio''s decision.

Art

推荐答案

您好,


我只想加入投票反对使用''@'' Python语言。


我使用Leo(用Python编写的智能折叠编辑器),它大量使用@并在Python中使用相同的字符可能会产生一些不兼容性。


我不认为@在任何情况下看起来都很好,我不希望Python开始像其他语言一样丑陋。 (虽然我喜欢在Oberon中 - 因为使用大写关键字而丑陋 - 通过用''*'标记变量来声明变量,就像在var *中一样。)


在许多非英语键盘上输入''''并不是很简单,但由于装饰器不会在任何地方使用,我想这是一个弱点。


- Josef
Hello,

I just would like to add my vote against using ''@'' in the Python language.

I use Leo (the intelligent folding editor written in Python), which makes heavy use of @ and using the same character in Python might create some incompatibilities.

I don''t think @ looks good in ANY context and I don''t want Python to start looking as ugly as some other languages. (Though I like how in Oberon - which is ugly otherwise because of its use of uppercase keywords - a variable is declared public by marking it with a ''*'', like in var*).

On many non-English keyboards it isn''t exactly simple to type an ''@'', but since decorators aren''t going to be used everywhere, I guess this is a weak point.

- Josef


Josef Dalcolmo写道:
Josef Dalcolmo wrote:
在许多非英语键盘上它不是输入''@''非常简单,但
因为装饰器不会在任何地方使用,我想这是一个弱点。
On many non-English keyboards it isn''t exactly simple to type an ''@'', but
since decorators aren''t going to be used everywhere, I guess this is a
weak point.



让我补充说暂时切换到美国键盘布局(*)以便

编程有助于以下所有字符:@ \ [] {} |` 。


彼得

(*)显然是对我的迷恋



Let me add that temporarily switching to an American keyboard layout (*) for
programming helps with all of the following chars: @\[]{}|`.

Peter
(*) clearly an obsession of mine


>>> ;>> "彼得" == Peter Otten< __ ******* @ web.de>写道:


彼得>让我补充说暂时改用美国人

彼得>键盘布局(*)用于编程有助于所有的

彼得>以下字符:@ \ [] {} |`。


美国布局确实是用语言编程的唯一合理方式

为美国布局设计,其中包括大多数主流的

语言。


如果你不够男人学习德沃夏克,那就是;-)。我最近转换了
,并做了一些额外的键盘调整,比如切换

''8''/''(''和'')''\'' 9''这样我就不需要按下班次了。

parens。像8和9这样的数字对于编码是无用的 - 一切都是超过0和1的
意味着设计有缺陷。


-

Ville Vainio http://tinyurl.com/2prnb
>>>>> "Peter" == Peter Otten <__*******@web.de> writes:

Peter> Let me add that temporarily switching to an American
Peter> keyboard layout (*) for programming helps with all of the
Peter> following chars: @\[]{}|`.

US layout is indeed the only sensible way to program in languages
designed for US layouts, which pretty much includes most mainstream
languages.

If you are not man enough to learn Dvorak, that is ;-). I recently
switched over, and did some additional keymap tweaking like switching
''8''/''('' and '')''\''9'' so that I won''t need to press shift for
parens. Numbers like 8 and 9 are useless for coding - everything
beyond 0 and 1 implies a flawed design.

--
Ville Vainio http://tinyurl.com/2prnb


这篇关于PEP318的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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