Terry Reedy wrote:
> Antoine Pitrou wrote:
>> Terry Reedy 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
>>>
>>>
Antoine Pitrou wrote:
Terry Reedy 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__')
2009/3/18 Antoine Pitrou :
>
>> class C() to class C(object)
>
> __metaclass__ = type
Or even better: just inherit from object in 3.0 and 2.x. :)
--
Regards,
Benjamin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/li
Terry Reedy 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__(s
Antoine Pitrou wrote:
Terry Reedy udel.edu> writes:
Or the much requested 3to2 using the same tools.
I didn't know there was such a request. I thought it was only a PyPy April fool.
Some of the people who need to support both late 2.x and 3.x would
prefer to write 3.x code and backport. T