Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> co_consts[0] is used for setting the initial value of __doc__.

Why is __doc__ set this way, but __name__ is set directly on the function 
object?  Setting __doc__ from the code object seems like an odd implementation 
hack that puts the responsibility in the wrong place and that leaves a dangling 
reference when __doc__ is updated.

----------

_______________________________________
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

Reply via email to