[Python-Dev] cpython: inspect.Signature: Add 'Signature.from_callable' classmethod. Closes #17373
Antoine Pitrou
solipsis at pitrou.net
Thu Mar 27 17:48:16 CET 2014
More information about the Python-Dev mailing list
Thu Mar 27 17:48:16 CET 2014
- Previous message: [Python-Dev] multiprocessing BaseManager's "serializer" argument
- Next message: [Python-Dev] cpython: inspect.Signature: Add 'Signature.from_callable' classmethod. Closes #17373
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 27 Mar 2014 17:12:02 +0100 (CET) yury.selivanov <python-checkins at python.org> wrote: > > + .. classmethod:: Signature.from_callable(obj) > + > + Return a :class:`Signature` (or its subclass) object for a given callable > + ``obj``. This method simplifies subclassing of :class:`Signature`: > + > + :: > + > + class MySignature(Signature): > + pass > + sig = MySignature.from_callable(min) > + assert isinstance(sig, MySignature) > + This needs a "versionadded" tag. Regards Antoine.
- Previous message: [Python-Dev] multiprocessing BaseManager's "serializer" argument
- Next message: [Python-Dev] cpython: inspect.Signature: Add 'Signature.from_callable' classmethod. Closes #17373
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list