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 — Provide a hint when accidentally calling a module · Issue #103899 · python/cpython Closed Labels 3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)sprinttype-featureA feature request or enhancementA feature request or enhancement DescriptionThis is sort of inspired by PEP 713, but I think it's worth doing whether that PEP is accepted or not. When somebody attempts to call a module, we can provide a more helpful >>> import pprint >>> pprint(thing) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'module' object is not callable. Did you mean: 'pprint.pprint(...)'? As somebody who hits this fairly frequently with modules like This is a cold code path, and I assume that this error is the most common reason for hitting it with a module object. So a little extra code (just one branch for non-modules) shouldn't be noticeable at all. Linked PRsReacted by Alex Waygood, Adam Turner, sunmy2019, Oleg Iarygin, rzehumat and Itamar Oren Activity
MetadataMetadataAssigneesLabels3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)sprinttype-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. |