Hello,

 

The Python spec states that the “from __future__ import …” statement can only occur at the beginning of the file, preceded only by doc strings, comments, empty lines or other future statements. The following code snippets, however, don’t raise Syntax error in Python 2.4.2. Is it a bug?

 

I am asking whether in IronPython we should try to match behavior of Python compiler, or stick to the language spec. In this case, I believe that we should stick to the spec and report a bug in Python compiler.

 

Thanks

Martin

 

Example 1:

------------------

x = 10 / 2

from __future__ import division

------------------

 

 

Example 2:

------------------

from sys import *

from __future__ import division

------------------

 

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to