Hey Kristjan,

you should better post only code that you tried.

"""
SyntaxError: from __future__ imports must occur at the beginning of the file
"""

On 07/01/14 16:23, Kristján Valur Jónsson wrote:
try:
     from __future__ import nonlocal
except SyntaxError:
     pass # aha, we're probably running version 3 already!

K

-----Original Message-----
From: [email protected] [mailto:stackless-
[email protected]] On Behalf Of Martijn Faassen
Sent: 7. janúar 2014 12:44
To: [email protected]
Subject: [Stackless] __future__ policy

Hi there,

I understand Stackless 2.8 is considering the following:

from __future__ import nonlocal

It was pointed out on the #python2.8 channel yesterday that this leads to a
problem when upgrading Stackless 2.8 code to Python 3.x code, as

from __future__ import nonlocal

is an error there. So it becomes impossible to write code that runs both on
Stackless 2.8 and Python 3.3, for instance.


_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless


--
Christian Tismer             :^)   <mailto:[email protected]>
Software Consulting          :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776  fax +49 (30) 700143-0023
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/


_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to