[Stackless] __future__ policy

Christian Tismer tismer at stackless.com
Wed Jan 8 12:36:15 CET 2014


Hi Sweskman,

On 08.01.14 10:06, Kristján Valur Jónsson wrote:
>
>> -----Original Message-----
>> From: stackless-bounces at stackless.com [mailto:stackless-
>> bounces at stackless.com] On Behalf Of Kristján Valur Jónsson
>> Sent: 8. janúar 2014 08:56
>> To: The Stackless Python Mailing List
>> Subject: Re: [Stackless] __future__ policy
>> "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.
> Ok, I see now that you could also be providing a __stackless__.py module to deal with the default 3.x case.
> Still, a very cludgy proposition.

Yep. For me, it seems to be cleanest/simplest for now to extend __future__,
and make a matching stackless 3.x that adds exactly those as no-ops.

Python 3.4 can follow the patch, or we change things.
I think that will not be so problematic, since the compat header is at the
front of the module, and semi-auto-conversion would be possible.

> I wonder how cPython would view adding no-op codes to the 3.4 __future__ module at this stage?
> What would we like to propose?  nonlocal and yield_from are the obvious candidates

Maybe also a bit about str/unicode, see 
https://github.com/PythonCharmers/python-future/issues/27

Actually we should connect to http://python-future.org/ to find out more.

Furthermore, something we need to add is support for metaclasses.
Right now you need to do quite nasty tricks to make things work,
see the SIX module. It is actually impossible to directly use metaclasses
without a syntax error.

cheers - chris

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
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/




More information about the Stackless mailing list