[issue27855] 2to3: Wrong code output w/ has_key without trailing space

2021-10-20 Thread Irit Katriel
Change by Irit Katriel : -- status: open -> closed superseder: -> Close 2to3 issues and list them here ___ Python tracker ___ ___ P

[issue27855] 2to3: Wrong code output w/ has_key without trailing space

2016-08-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you don't want to sign the CA, https://www.python.org/psf/contrib/, and upload a file without a guarantee, which is never given ;-), just give the patch in a text message. While it may be unreasonable to *expect* 2to3 to handle this, it also might not be u

[issue27855] 2to3: Wrong code output w/ has_key without trailing space

2016-08-25 Thread E Rippey
E Rippey added the comment: I have one line change to "Lib/lib2to3/fixes/fix_has_key.py" that will resolve this issue. Would a patch be accepted? It doesn't seem like the input is unusually contorted. -- status: closed -> open ___ Python tracker <

[issue27855] 2to3: Wrong code output w/ has_key without trailing space

2016-08-25 Thread R. David Murray
Changes by R. David Murray : -- title: 2to3: Wrong code output w/ has_key -> 2to3: Wrong code output w/ has_key without trailing space ___ Python tracker ___ __

[issue27855] 2to3: Wrong code output w/ has_key

2016-08-25 Thread R. David Murray
R. David Murray added the comment: I don't think it is necessary or reasonable to expect 2to3 to handle this. It is a tool for the developer to use, so just clean up the input. -- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed ___

[issue27855] 2to3: Wrong code output w/ has_key

2016-08-24 Thread Eric N. Vander Weele
Eric N. Vander Weele added the comment: > Eric, remove the space from after the has_key call to match OP: > $ cat test.py > a.has_key(b)and x Good catch. Disregard msg273622 from me - I am able to replicate what the OP has described. -- ___ Python

[issue27855] 2to3: Wrong code output w/ has_key

2016-08-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: Testing it myself that way: C:\>type test.py a.has_key(b)and x C:\>"C:\Program Files\Python 3.5\Tools\scripts\2to3.py" test.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional f

[issue27855] 2to3: Wrong code output w/ has_key

2016-08-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: Eric, remove the space from after the has_key call to match OP: $ cat test.py a.has_key(b)and x It's legal to omit the space there. -- nosy: +josh.r ___ Python tracker _

[issue27855] 2to3: Wrong code output w/ has_key

2016-08-24 Thread Eric N. Vander Weele
Eric N. Vander Weele added the comment: I am unable to replicate this issue with '2to3' from Python 2.7.12, Python 3.4.5, nor Python 3.5.2. Below is what I get with the versions I mentioned above. --- $ cat test.py a.has_key(b) and x $ 2to3 test.py RefactoringTool: Skipping optional fixer: b

[issue27855] 2to3: Wrong code output w/ has_key

2016-08-24 Thread E Rippey
New submission from E Rippey: The "has_key" fixer in 2to3 produces wrong code on the following example: input:"a.has_key(b)and x" output:"b in aand x" Note the lack of space before "and" in the input. -- components: 2to3 (2.x to 3.x conversion tool) messages: 273613 nosy: rippey.e prio