So we're making pretty heavy use of PyInstanceMethod_New in our python
binding library that we've written for a bunch of in house tools.
If this isn't the best / correct way to go about adding methods to objects,
what should we be using instead?


On Sun, Apr 7, 2019 at 2:17 AM Jeroen Demeyer <j.deme...@ugent.be> wrote:

> On 2019-04-07 09:48, Serhiy Storchaka wrote:
> > total_ordering monkeypatches the decorated class. I'm planning to
> > implement in C methods that implement __gt__ in terms of __lt__ etc.
>
> Yes, I understood that. I'm just saying: if you want to make it fast,
> that's not the best solution. The fastest would be to implement
> tp_richcompare from scratch (instead of relying on slot_tp_richcompare
> dispatching to methods).
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/robert.wd.white%40gmail.com
>
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to