[Cython] tp_alloc() vs. object.__new__() (was: Cython 0.20 beta 2)
stefan_ml at behnel.de
Sun Jan 12 10:21:16 CET 2014
Stefan Behnel, 12.01.2014 09:20:
> The only thing that is still a bit unclear to me is whether calling
> object.__new__() from extension types was a good idea:
> It means that we are now running a couple of safety checks inside of
> CPython on object instantiation that validate the arguments being passed
> into __init__() and __new__(), because object() doesn't expect any.
> If we want to play safe for the release, we could restrict this change only
> to abstract classes for now (for which we know that CPython will generate
> an error). That was the original intention of the change anyway.
Proposed patch push to master for testing.
More information about the cython-devel