[issue14697] parser module doesn't support set displays or set comprehensions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[issue14697] parser module doesn't support set displays or set comprehensions

STINNER Victor

New submission from Mark Dickinson <[hidden email]>:

>>> parser.tuple2st(parser.expr('{2}').totuple())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
parser.ParserError: could not validate expression tuple
[70677 refs]
>>> parser.tuple2st(parser.expr('{x**2 for x in [1, 2, 3]}').totuple())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
parser.ParserError: could not validate expression tuple
[70677 refs]

This seems to be already fixed in Python 2.7.

----------
components: Library (Lib)
messages: 159656
nosy: mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: parser module doesn't support set displays or set comprehensions
type: behavior
versions: Python 3.2, Python 3.3

_______________________________________
Python tracker <[hidden email]>
<http://bugs.python.org/issue14697>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/lists%2B1322467933539-512619%40n6.nabble.com

Reply | Threaded
Open this post in threaded view
|

[issue14697] parser module doesn't support set displays or set comprehensions

STINNER Victor

Mark Dickinson <[hidden email]> added the comment:

Patch attached.

----------
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file25428/parser_dictorsetmaker.patch

_______________________________________
Python tracker <[hidden email]>
<http://bugs.python.org/issue14697>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/lists%2B1322467933539-512619%40n6.nabble.com