[issue24492] using custom objects as modules: AttributeErrors new in 3.5
Terry J. Reedy
report at bugs.python.org
Fri Jun 26 23:05:19 CEST 2015
Terry J. Reedy added the comment:
I view having a string __name__ attribute as part of quacking like a module (or class or function). Hence pseudonames like '<lambda>' (lambda expression) or <pyshell#n> (the module name for interactive input, where n is the line number). Is there a good reason for custom 'module' objects to not have a name? If so, the 'graceful muddle' precedent is to give them a pseudoname, such as <module>, perhaps with a prefix or suffix.
----------
nosy: +terry.reedy
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24492>
_______________________________________
More information about the Python-bugs-list
mailing list