> It probably wouldn't be very difficult to make element_new() the tp_new
> of Element_Type, and expose that type as "Element".
> That would settle the issue nicely and avoid compatibility concerns :)
>
> Regards
>

I guess it's not as simple as that. element_new doesn't quite have the
signature required for tp_new. Besides, a constructor would also be needed
(since a subclass may be interested in calling Element.__init__) and
there's no natural function to serve as the constructor.

I've opened issue 14128 to track this. I plan to implement a standard
tp_new and tp_init functions for Element to expose it as a class from the
module. element_new also happens to be used internally - I'll try to
refactor to avoid code duplication as much as possible.

Eli
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to