homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ryan.petrello
Recipients SilentGhost, eric.snow, ncoghlan, ryan.petrello, yselivanov
Date 2016年06月22日.12:08:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466597314.59.0.950925946316.issue27172@psf.upfronthosting.co.za>
In-reply-to
Content
Nick,
My use case is an issue of backwards compatibility and multiple Python version support for a library that makes prolific use of the legacy argspec (args, varargs, varkw, defaults) namedtuple, *including* the bound self argument behavior. argspec and signature are quite different, and supporting a Py26-Py36 codebase that handles both simultaneously seemed like quite a burden, so I opted to write a compatibility shim that returned an Argspec-like object for all versions of Python; this seemed the simplest approach to bridge the gap in a codebase that supports Python 2.6 through 3.6, and it's the approach that I've seen other major libraries (like Django) take:
https://github.com/pecan/pecan/pull/61
I'm using a similar approach to Python 3.5's getfullargspec() implementation:
https://github.com/python/cpython/blob/3.5/Lib/inspect.py#L1069
...but I don't have a long-term public API for doing it (so I have to rely on the private inspect._signature_from_callable call, which seems icky).
History
Date User Action Args
2016年06月22日 12:08:34ryan.petrellosetrecipients: + ryan.petrello, ncoghlan, SilentGhost, eric.snow, yselivanov
2016年06月22日 12:08:34ryan.petrellosetmessageid: <1466597314.59.0.950925946316.issue27172@psf.upfronthosting.co.za>
2016年06月22日 12:08:34ryan.petrellolinkissue27172 messages
2016年06月22日 12:08:34ryan.petrellocreate

AltStyle によって変換されたページ (->オリジナル) /