andrew cooke <andrew <at> acooke.org> writes:
> Unfortunately, "metaclass=" is a syntax error in 2.6 so the following
> still fails:
> 
> from sys import version
> 
> if version.startswith('2.'):
>     class Matcher():
>         pass
> else:
>     class Matcher(metaclass=ABCMeta):
>         pass

I would suggest that you use the 2.6 syntax, and run "2to3 -f metaclass" on your
code. (ABCs have been backported to 2.6.)




--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to