On Wed, May 2, 2012 at 2:38 PM, Simon King <simon.k...@uni-jena.de> wrote: > Hi Michael, > > On 2012-05-02, Michael Orlitzky <mich...@orlitzky.com> wrote: >> You can usually call the underscore methods directly. > > I thought (i.e.: I am sure that I was repeatedly told) that calling > magical methods in a doctest is strongly discouraged. The reason is > that one purpose of doctests is educational. As a reviewer, I would > not hesitate to ask for changing such an overly explicit test, when > the doctest fails to show how the method is really supposed to be > used. Of course, `_repr_` and friends is not supposed to be called > directly - hence the indirect test.
I *always* call _repr_ directly in the doctest of repr. I only ever make indirect doctests when there is no easy way to make a good direct one. > > Cheers, > Simon > > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org -- William Stein Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org