python-dev
[Prev] Thread [Next] | [Prev] Date [Next]
Re: [Python-Dev] Core projects: 3to2 andrew cooke Thu Mar 19 04:00:32 2009
Terry Reedy wrote:
> Antoine Pitrou wrote:
>> Terry Reedy <tjreedy <at> udel.edu> writes:
>>> Some of the people who need to support both late 2.x and 3.x would
>>> prefer to write 3.x code and backport. The OP of a current python-list
>>> thread asked whether there was any way to write something like
>>>
>>> @alias('__nonzero__')
>>> def __bool__(self): return True
>>
>> How about simply:
>> __nonzero__ = __bool__
>>
>>> I believe my own 3.0 code will mainly also need
>>> print() to print statement
>>
>> If this is only about supporting "late 2.x" (i.e., 2.6 and upwards), you
>> can
>> already write:
>
> People often do not specify. I suspect some are thinking back to 2.5,
> but that will change in the future.
i am the author of the original post quoted above. i wrote a parser
library (lepl) using 3.0. backporting to 2.6 was fairly easy, but it
still does not run with 2.5.
if i remember correctly it appeared that i was going to need separate
source files because of significant differences in syntax (print,
exceptions) as well as missing functionality (metaclasses, string
formatting).
andrew
_______________________________________________
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/alexiscircle%40gmail.com
- [Python-Dev] Core projects for Summer of Code Arc Riley
- Re: [Python-Dev] Core projects for Summer of Code R. David Murray
- Re: [Python-Dev] Core projects for Summer of Code Terry Reedy
- Re: [Python-Dev] Core projects for Summer of Code Antoine Pitrou
- Re: [Python-Dev] Core projects: 3to2 Terry Reedy
- Re: [Python-Dev] Core projects: 3to2 Antoine Pitrou
- Re: [Python-Dev] Core projects: 3to2 Benjamin Peterson
- Re: [Python-Dev] Core projects: 3to2 Terry Reedy
- Re: [Python-Dev] Core projects: 3to2 andrew cooke <=
- Re: [Python-Dev] Core projects for Summer of Code Arc Riley
- Re: [Python-Dev] Core projects for Summer of Code Benjamin Peterson
- Re: [Python-Dev] Core projects for Summer of Code Arc Riley
- Re: [Python-Dev] Core projects for Summer of Code Benjamin Peterson
- Re: [Python-Dev] Core projects for Summer of Code Brett Cannon
- Re: [Python-Dev] Core projects for Summer of Code Arc Riley
- Re: [Python-Dev] Core projects for Summer of Code Benjamin Peterson
- Re: [Python-Dev] Core projects for Summer of Code Daniel (ajax) Diniz
- Re: [Python-Dev] Core projects for Summer of Code Arc Riley
- Re: [Python-Dev] Core projects for Summer of Code Steve Holden