Message8215

Author tlecomte
Recipients fwierzbicki, tlecomte
Date 2013-12-26.08:55:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1388048127.14.0.483972786595.issue2108@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Frank,

Thanks for your answer ! Here is a narrowed-down example:

This is on CPython, for reference:

$ python
Python 2.7.5 (default, Aug 28 2013, 10:09:22) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import _ast
>>> m = _ast.Module()
>>> m.level = 1
>>> m.level
1

and now with Jython:

>>> import _ast
>>> m = _ast.Module()
>>> m.level = 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: '_ast.Module' object has no attribute 'level'


P.S. : I also noticed another difference with _ast.AST(), but it is not a problem with pyflakes:

On CPython:
Python 2.7.5 (default, Aug 28 2013, 10:09:22) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import _ast
>>> a = _ast.AST()
>>> a
<_ast.AST object at 0x1003430a0>
>>>

On Jython:
>>> import _ast
>>> a = _ast.AST()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot create '_ast.AST' instances
>>>
History
Date User Action Args
2013-12-26 08:55:27tlecomtesetmessageid: <1388048127.14.0.483972786595.issue2108@psf.upfronthosting.co.za>
2013-12-26 08:55:27tlecomtesetrecipients: + tlecomte, fwierzbicki
2013-12-26 08:55:27tlecomtelinkissue2108 messages
2013-12-26 08:55:26tlecomtecreate