On 2018-05-15 18:36, Petr Viktorin wrote:
What is your ultimate use case?

(I'll just answer this one question now and reply to the more technical comments in another thread)

My ultimate use case is being able to implement functions and methods which are

(A) equally fast as the existing built-in function and methods

(B) and behave from a user's point of view like Python functions.

With objective (A) I want no compromises. CPython has many optimizations for built-in functions and all of them should work for my new functions.

Objective (B) means more precisely:

1. Implementing __get__ to turn a function in a method.

2. Being recognized as "functions" by tools like Sphinx and IPython.

3. Introspection support such as inspect.signature() and inspect.getsource().


Jeroen.
_______________________________________________
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