[ python-Bugs-1543306 ] "from __future__ import foobar; " causes wrong SyntaxError
SourceForge.net
noreply at sourceforge.net
Sun Aug 20 04:16:07 CEST 2006
Bugs item #1543306, was opened at 2006-08-20 04:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1543306&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: daniel hahler (blueyed)
Assigned to: Nobody/Anonymous (nobody)
Summary: "from __future__ import foobar;" causes wrong SyntaxError
Initial Comment:
Instead of "SyntaxError: future feature foobar is not
defined", you will get "SyntaxError: from __future__
imports must occur at the beginning of the file", if
you use a semicolon at the end of the line (which is
valid for existing future-imports of course).
Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> from __future__ import foobar;
File "<stdin>", line 1
SyntaxError: from __future__ imports must occur at
the beginning of the file
>>> from __future__ import generators;
>>>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1543306&group_id=5470
More information about the Python-bugs-list
mailing list