Terry J. Reedy <tjre...@udel.edu> added the comment:

The bug is the discrepancy between doc

"[3] A string literal appearing as the first statement in the function
body is transformed into the function’s __doc__ attribute and therefore
the function’s docstring. 
[4] A string literal appearing as the first statement in the class body
is transformed into the namespace’s __doc__ item and therefore the
class’s docstring. "

and behavior. In this case, I would agree that the behavior is wrong
unless somehow justified.

I verified in 3.0.1, winxp: '\x00' ok in function, not in class.

----------
nosy: +tjreedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5373>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to