[docs] [issue26303] Shared execution context between doctests in a module

kernc report at bugs.python.org
Sat Feb 6 11:16:50 EST 2016


kernc added the comment:

The use case is not unpopular [1] and with unambiguous examples like

    >>> arr = np.arange(5)
    >>> my_sum(arr)
    10

(i.e., without importing numpy as np everywhere), it also makes a lot of sense.


[1]: http://stackoverflow.com/questions/13106118/object-reuse-in-python-doctest/35242443

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26303>
_______________________________________


More information about the docs mailing list