Mark Shannon <m...@hotpy.org> added the comment:
There is a clear disadvantage in moving the docstring from the function's code object to the enclosing code object: Docstrings are rarely looked at (relative to other operations on functions). Inner functions and comprehensions are created many times for the same code object, and their docstring are (almost) never inspected. Given that, the obvious enhancement is to create docstrings lazily to reduce the overhead of creating a function. This change would prevent that enhancement. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36521> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com