[New-bugs-announce] [issue13135] Using type() as a constructor doesn't support new class keyword arguments
report at bugs.python.org
Sat Oct 8 23:53:38 CEST 2011
New submission from Marty Alchin <marty at martyalchin.com>:
PEP 3115 introduced keyword arguments to class definitions and changed metaclasses to use them instead. Unfortunately, `type()` doesn't seem to have been updated to accept those keyword arguments as well. What this amounts to is that using `type()` as a constructor can no longer fully replicate the behavior of a class definition. Therefore, classes that use keyword arguments can't be created dynamically.
I would attempt a patch, but I don't have a development environment capable of compiling Python, so I wouldn't have any chance to test it.
title: Using type() as a constructor doesn't support new class keyword arguments
type: feature request
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce