-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Type slot functions (tp_new, nb_add) have fixed signatures, which makes it impossible to pass extra context. In particular
- you can't easily get an equivalent of Python's
__class__cell, so you can't easily emulatesuperin heap types. - we can't pass a HPy-style context.
- we can't change the signature, e.g. when
tp_getattrowas added,tp_getattrwas kept around, complicating inheritance. - somewhat related, we can't easily implement flags like “this is a legacy function so it needs a GIL held” for nogil.
- (edit) docstrings / type annotations can't be set for type slot wrappers
Reactions are currently unavailable