[Python-ideas] doctest
Barry Warsaw
barry at python.org
Mon Mar 5 20:40:58 CET 2012
On Mar 02, 2012, at 01:27 PM, Mike Meyer wrote:
>So the question is - why isn't dealing with this the responsibility of
>the test writer? Yeah, it's not quite the spirit of documentation to
>turn a dictionary into a sorted list in the output, but neither is
>littering the documentation with +LITERAL_EVAL and the like.
Yeah, it basically is. My contention, based on years of experience (though of
course YMMV) is that the best way to solve this is to write better
documentation. I personally don't find bare dict prints to be very useful or
readable, but a nice little sort/loop/print works fine.
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120305/115fa6b6/attachment.pgp>
More information about the Python-ideas
mailing list