[Stackless] __future__ policy
Kristján Valur Jónsson
kristjan at ccpgames.com
Wed Jan 8 09:56:18 CET 2014
> -----Original Message-----
> From: stackless-bounces at stackless.com [mailto:stackless-
> bounces at stackless.com] On Behalf Of Christian Tismer
> Sent: 7. janúar 2014 15:49
> To: The Stackless Python Mailing List
> Subject: Re: [Stackless] __future__ policy
>
> Hey Kristjan,
>
> you should better post only code that you tried.
Why, that would almost be professional!
>
> """
> SyntaxError: from __future__ imports must occur at the beginning of the file
> """
Remarkable! So, Python has no way to deal with optional __future__ keywords?
Technically, I see why the code won't work. but I wonder if this can be made better?
"from __stackless__ import nonlocal"
does not help one part of what we are trying to achieve, allow polyglot code between 2.x and 3 to use nonlocal.
Because for the module that uses this code to work, you'd have to have to run it in either stackless 2.8 or a
new version of stackless 3.4 or whatever. i.e. you'd be tying your code to stackless, even if It were not doing
any stackless related stuff.
K
More information about the Stackless
mailing list