[Checkins] SVN: zope.interface/trunk/ Merge of regebro-python3 branch, adding Python 3.1 compatibility\!
Vincent Fretin
vincent.fretin at gmail.com
Fri Apr 9 08:16:04 EDT 2010
Vincent Fretin
Ecreall
Site : http://vincentfretin.ecreall.com
On Fri, Apr 9, 2010 at 10:20 AM, Wichert Akkerman <wichert at wiggy.net> wrote:
> On 4/9/10 10:16 , Lennart Regebro wrote:
>> + The 3.1 support is completely backwards compatible. However, the implements
>> + syntax used under Python 2.X does not work under 3.X, since it depends on
>> + how metaclasses are implemented and this has changed. Instead it now supports
>> + a decorator syntax (also under Python 2.X):
>> +
>> + class Foo:
>> + implements(IFoo)
>> + ...
>> +
>> + can now also be written
>> +
>> + @implementor(IFoo):
>> + class Foo:
>> + ...
>
> Can we use that in python 2.6 as well? It's a much nicer syntax.
>
There is somewhere is the commit:
"+Note that class decorators using the @implementor(IFoo) syntax are only
+supported in Python 2.6 and later."
;-)
Vincent
More information about the checkins
mailing list