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-January/137877.html below:

[Python-Dev] Any grammar experts?

[Python-Dev] Any grammar experts?Neil Girdhar mistersheik at gmail.com
Sun Jan 25 03:10:51 CET 2015
To finish PEP 448, I need to update the grammar for syntax such as

{**x for x in it}

and

{1:2, 3:4, **a}

It's been a long time since I've looked at grammars and I could really use
the advice of an expert.  I'm considering replacing:

dictorsetmaker: ( (test ':' test (comp_for | (',' test ':' test)* [','])) |
                  (test (comp_for | (',' test)* [','])) )

with:

dictpopulator: test ':' test | '**' test
dictorsetmaker: ( (dictpopulator (comp_for | (',' dictpopulator)* [','])) |
                   (test (comp_for | (',' test)* [','])) )

Am I headed in the right direction?  Of course I will need to edit
parsermodule.c and ast.c.

Best,

Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150124/af6b7677/attachment-0001.html>
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