Larry Hastings added the comment: Here's a patch. Wasn't as easy as I thought, it kind of took all day.
Changes include: * __init__ and __new__ always take kwargs. * if the function signature doesn't accept keyword arguments, it calls _PyArg_NoKeywords(). * __init__ returns int, not PyObject *. * __init__ and __new__ should support all argument parsing scenarios (unpack tuple, positional only, etc). Pre-exiting behavior: * The C function basename chosen for __new__ is just the name of the class, it doesn't end in __new__. * The methoddef #define is suppressed. ---------- Added file: http://bugs.python.org/file33537/larry.argument.clinic.init.and.new.patch.1.txt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20294> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com