On 11/04/2011 01:10 PM, Sylvain Thénault wrote:
> On 04 novembre 12:55, Gelonida N wrote:
>> Please look at  following small  python snippet
>>
>>
>> # code starts
>> a=3
>> from __future__ import absolute_import
>> print "will never see this"
>> # code ends
>>
>>
>> pylint 'just' reports a warning saying
>>> W0410:  2,0: __future__ import is not the first non docstring statement
>>
>>
>>
>> python 2.6.5 on the other hand will fail with a syntax error.
>>
>>> $ python bla.py
>>>   File "bla.py", line 2
>>>     from __future__ import absolute_import
>>> SyntaxError: from __future__ imports must occur at the beginning of the file
>>
>>
>>
>> Perhaps the warning should be promoted to an error?
>>
>> Sometimes I grep only for errors when trying to identify issues and
>> missed thus this warning.
> 
> yep you're right. Would you add a ticket for this please?

Done #82374

Somehow the time stamps seems of the bug tracker seem weird. The server
mentions something with 22 hours at the creation date.


> 


_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to