08.06.13 11:47, Ethan Furman написав(ла):
In this case it is better to exclude a code example from doctests or
add auxiliary code (i.e. as Steven suggested) to pass the doctest.

Are you saying there is something wrong about what I have in place now?
I would think that one line showing something you might actually do
(importing an Enum from another module) is better than two lines showing
esoteric workarounds (importing __main__ and setting an attribute on it).

test.test_enum is not here. The reader should look into the external test module (which may not be supplied along with the module and documentation) to understand the example. Or rely on assumptions.

Is it possible to add "invisible" code which doesn't displayed in the resulting documentation, but taken into account by doctest?


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to