__future__ and unrecognised flags

Discussion in 'Python' started by Poor Yorick, Dec 12, 2008.

  1. Poor Yorick

    Poor Yorick Guest

    I have a future statement in a script I intend to work on 2.6 and 3. Shouldn't __future__ statements basically be noops for versions that already support the feature? doctest is complaining about compiler flags. This illustrates the problem:

    Python 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] on win
    32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from __future__ import unicode_literals
    >>> src = 'a = "hello"'
    >>> c1 = compile(src,'<string>','exec',unicode_literals.compiler_flag)

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ValueError: compile(): unrecognised flags

    --
    Yorick
     
    Poor Yorick, Dec 12, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. red floyd
    Replies:
    0
    Views:
    402
    red floyd
    Aug 4, 2005
  2. JH Trauntvein

    G++ 4: Unrecognised Friendship

    JH Trauntvein, Aug 10, 2005, in forum: C++
    Replies:
    4
    Views:
    382
    Victor Bazarov
    Aug 10, 2005
  3. Poor Yorick
    Replies:
    0
    Views:
    267
    Poor Yorick
    Dec 13, 2008
  4. Steve Holden
    Replies:
    1
    Views:
    388
    Rhamphoryncus
    Dec 14, 2008
  5. Steve Holden
    Replies:
    0
    Views:
    780
    Steve Holden
    Feb 8, 2009
Loading...

Share This Page