A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-April/139627.html below:

[Python-Dev] PEP 492 vs. PEP 3152, new round

[Python-Dev] PEP 492 vs. PEP 3152, new roundEthan Furman ethan at stoneleaf.us
Wed Apr 29 17:29:30 CEST 2015
On 04/29, Yury Selivanov wrote:
> On 2015-04-29 5:12 AM, Greg Ewing wrote:
>> Yury Selivanov wrote:

>>> Looking at the grammar -- the only downside of the current
>>> approach is that
>>> you can't do 'await await fut'.  I still think that it reads better with
>>> parens.  If we put 'await' to 'factor' terminal we would allow
>>> 
>>>     await -fut  # await (-fut)
>> 
>> Is there really a need to disallow that? It would take
>> a fairly bizarre API to make it meaningful in the first
>> place, but in any case, it's fairly clear what order
>> of operations is intended without the parens.
> 
> Greg, if grammar can prevent this kind of mistakes - it should.
> I like my current approach.

That's like saying we should always put parens around the number being
raised in

  n ** x

because

 -2**4 != (-2)**4

Please do not overuse parens.  Python is not lisp, and await is not a
function, so parens should not be needed in the common case.

--
~Ethan~
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4