Mark Lawrence added the comment:
Can somebody set this to patch review and do the honours please. FWIW I
don't like tulplesub in the patch.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6978
Terry J. Reedy added the comment:
I am closing this because a) Meador is correct that we do not normally patch
deprecated features and b) the current emphasis on 2.7-only patches is security
and keeping 2.7 working on current systems. The fix would only benefit 2.7.9+
code or 2.7.9+ and 3.x
Kees Bos k@zx.nl added the comment:
Added fix for python 2.7, which includes a test (testDictWithTupleKey) for the
compiler test (Lib/test/test_compiler.py).
--
status: pending - open
Added file: http://bugs.python.org/file18642/compiler-bug-issue6978.patch
Changes by Terry J. Reedy tjre...@udel.edu:
Removed file: http://bugs.python.org/file14958/compiler.transformer.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6978
___
Terry J. Reedy tjre...@udel.edu added the comment:
This can only be fixed in 2.7, where compiler is deprecated in favor of ast.
Compiler is gone in 3.x. Kees, are you planning to update the patch (with no
guarantee anyone will apply) or should we close this?
--
nosy: +tjreedy
status:
Benjamin Peterson benja...@python.org added the comment:
As I said before, the patch needs a test and should remove those ugly \ from
the list comprehension.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6978
Chuck Rhode crh...@lacusveris.com added the comment:
Here are four ways to generate things called in the documentation Abstract
Syntax Trees (ASTs). Obviously they are not all the same kind of object:
#!/usr/local/bin/python2.6
import sys
import compiler
import parser
import ast
STATEMENT =
Benjamin Peterson benja...@python.org added the comment:
I don't see why the compiler module is any better than any of the other ways
that produce reasonable AST.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6978
Chuck Rhode crh...@lacusveris.com added the comment:
I don't see why the compiler module is any better than any of the other
ways that produce reasonable AST.
It is available on Python releases older than 2.6?
--
___
Python tracker
Kees Bos k@zx.nl added the comment:
It's available at least since 2.4.
We're using it in Pyjamas (pyjs.org) to generate javascript code from python
code.
If there are better ways to produce python asts, I'd be happy to know that.
--
___
Python
Meador Inge mead...@gmail.com added the comment:
I think this should be closed out, since the compiler package was deprecated in
2.6.
--
nosy: +minge
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6978
Chuck Rhode crh...@lacusveris.com added the comment:
PythonTidy encounters this problem.
o http://lacusveris.com/PythonTidy/PythonTidy.python
It is unable correctly to render line 694 of test_grammar.py in the
Python Test Suite:
d[1,] = 2
becomes:
d[1] = 2
because the *compiler*
Benjamin Peterson benja...@python.org added the comment:
The patch should have a test.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6978
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
your patch is no more a diff file (the 'previous' file is empty)
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6978
Kees Bos k@zx.nl added the comment:
Sorry. Renamed .bak to .orig ...
Here's the patch compiler/transformer.py (against python 2.5)
--
Added file: http://bugs.python.org/file15068/transformer.py.patch
___
Python tracker rep...@bugs.python.org
New submission from Kees Bos k@zx.nl:
compiler.parse(d[1] = 1) should have a single tuple as subs
compiler.parse(d[1] = 1)
Module(None, Stmt([Assign([Subscript(Name('d'), 'OP_ASSIGN',
[Const(1)])], Const(1))]))
compiler.parse(d[1,] = 2)
Module(None, Stmt([Assign([Subscript(Name('d'),
Kees Bos k@zx.nl added the comment:
I just see that my patch is not correct, since the following is
supported by the language:
O[1:2:3, 4:5:6]
Where O[1:2:3, 4:5:6] == O[slice(1,2,3), slice(4,5,6)] ==
O.__getitem__((slice(1,2,3), slice(4,5,6)))
--
Kees Bos k@zx.nl added the comment:
patch which honors O[1:2:3, 4:5:6]
--
Added file: http://bugs.python.org/file14958/compiler.transformer.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6978
Changes by Kees Bos k@zx.nl:
Removed file: http://bugs.python.org/file14957/compiler.transformer.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6978
___
19 matches
Mail list logo