[Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes (original) (raw)
Nathaniel Smith njs at pobox.com
Fri Jun 6 00:22:17 CEST 2014
- Previous message: [Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes
- Next message: [Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Jun 5, 2014 at 11:12 PM, Paul Moore <p.f.moore at gmail.com> wrote:
On 5 June 2014 22:47, Nathaniel Smith <njs at pobox.com> wrote:
To make sure I understand correctly, you're suggesting something like adding a new set of special method slots, teadd, temul, etc. I wasn't thinking in that much detail, TBH. I'm not sure adding a whole set of new slots is sensible for such a specialised case. I think I was more assuming that the special method implementations could use an alternative calling convention, METHSTACK in place of METHVARARGS, for example. That would likely only be viable for types implemented in C. But either way, it may be more complicated than the advantages would justify...
Oh, I see, that's clever. But, unfortunately most special methods at the C level don't use METH_*, they just have hard-coded calling conventions: https://docs.python.org/3/c-api/typeobj.html#number-structs
-- Nathaniel J. Smith Postdoctoral researcher - Informatics - University of Edinburgh http://vorpus.org
- Previous message: [Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes
- Next message: [Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]