[Checkins] SVN: zope.interface/trunk/ Merge of regebro-python3 branch, adding Python 3.1 compatibility\!

Wichert Akkerman wichert at wiggy.net
Fri Apr 9 04:20:15 EDT 2010


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.

Wichert.


More information about the checkins mailing list