GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Convert the struct module to use the Argument Clinic · Issue #143672 · python/cpython Closed Labels extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-argument-clinictype-featureA feature request or enhancementA feature request or enhancement DescriptionFeature or enhancementProposal:This is partially done, but some functions/methods aren't converted. Perhaps, due to missing support for starargs / var-positional parameters. Now it's possible. This also will fix some signatures. >>> import inspect, struct >>> help(struct.pack) Help on built-in function pack in module _struct: pack(...) pack(format, v1, v2, ...) -> bytes Return a bytes object containing the values v1, v2, ... packed according to the format string. See help(struct) for more on format strings. >>> inspect.signature(struct.pack) Traceback (most recent call last): File "<python-input-6>", line 1, in <module> inspect.signature(struct.pack) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "/usr/local/lib/python3.15/inspect.py", line 3346, in signature return Signature.from_callable(obj, follow_wrapped=follow_wrapped, ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ globals=globals, locals=locals, eval_str=eval_str, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ annotation_format=annotation_format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.15/inspect.py", line 3061, in from_callable return _signature_from_callable(obj, sigcls=cls, follow_wrapper_chains=follow_wrapped, globals=globals, locals=locals, eval_str=eval_str, annotation_format=annotation_format) File "/usr/local/lib/python3.15/inspect.py", line 2542, in _signature_from_callable return _signature_from_builtin(sigcls, obj, skip_bound_arg=skip_bound_arg) File "/usr/local/lib/python3.15/inspect.py", line 2326, in _signature_from_builtin raise ValueError("no signature found for builtin {!r}".format(func)) ValueError: no signature found for builtin <built-in function pack> Has this already been discussed elsewhere?This is a minor feature, which does not need previous discussion elsewhere Links to previous discussion of this feature:No response Linked PRs
Activity
MetadataMetadataAssigneesLabelsextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-argument-clinictype-featureA feature request or enhancementA feature request or enhancement Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |