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 — Empty __module__ attribute for built-in static methods · Issue #115231 · python/cpython Closed Labels interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement DescriptionBug reportBug description:An example: >>> bytes.maketrans.__module__ is None True c.f. pure-python staticmethod: >>> class Spam: ... @staticmethod ... def foo(): ... pass ... >>> Spam.foo.__module__ '__main__' I'm not sure, maybe this should be treated rather as a feature request. Docs says about the attribute value: "The name of the module the function was defined in, or None if unavailable." But clearly, this value is available: the Edit: BTW, same happens for class methods, e.g.: >>> int.from_bytes.__module__ is None True Probably this should be fixed as well. CPython versions tested on:CPython main branch Operating systems tested on:No response Linked PRsActivity
MetadataMetadataAssigneesLabelsinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement ProjectsMilestoneRelationshipsDevelopmentIssue 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. |