On Mon, 11 Feb 2013 00:09:55 +1000 Nick Coghlan firstname.lastname@example.org wrote:
As far as the maintenance burden goes, the patch to enable PEP 422 for types.new_class() is trivial:
- return meta(name, bases, ns, **kwds)
- cls = meta(name, bases, ns, **kwds)
initcl = cls.__init_class__
- except AttributeError:
- return cls
I didn't know types.new_class(). I suppose that's because I'm not part of the top half dozen people on the planet :-) I've stopped trying to understand when I saw about the __build_class__ additions and whatnot. I now consider that part of the language totally black magic.
I'm not sure it's a good thing when even some maintainers of the language don't understand some of its (important) corners.
The change in the builtin.__build_class__ implementation is similarly trivial (and has the same semantics), it's just more verbose due to its being written in C.
Sure, every little addition is "trivial". At the end you have a scary monster made of many little trivial additions along the years, and everyone has to take care not to break it.