meteclasses 2.x/3.x compatibility

andrew cooke andrew at
Wed Apr 20 08:18:51 EDT 2011

What I do in Lepl is use two stages.  The first calls the type/metaclass directly and the second subclasses that.  This avoids using the "sugar" that changes between 2 and 3.

So, for example, in I have

  _Matcher = ABCMeta('_Matcher', (object, ), {})

and then

  class Matcher(_Matcher):


More information about the Python-list mailing list