• Kevin Modzelewski's avatar
    Throw a SyntaxError if you try to import from __future__ · 95ef55eb
    Kevin Modzelewski authored
    I guess there's actually a real __future__ module that contains
    information in it about the special features you just enabled!
    Until this change you would get that information, but not actually
    enable any features.  The right behavior is to raise a SyntaxError
    for all __future__ directives we don't support (which is all of them).
    
    "import __future__" works if you want that...
    
    I'm not sure that throwing a SyntaxError from the IRGenerator is safe,
    since there are things that won't get cleaned up, but I guess
    it's not that much worse than if it worked; and this SyntaxError will
    typically kill the program anyway.
    95ef55eb
irgenerator.cpp 97 KB