David: The dynkin_diagram method does return a string. However, it has a newline character in it, so you need a print statement to make things show up in two lines, rather than one line with a "\n".
On Friday, 2 August 2013 22:33:04 UTC+1, David Joyner wrote: > > > > On Friday, August 2, 2013, Mary Clark wrote: > >> Additionally, regarding PR 2344, in my docstring for dynkin_diagram.py I >> have a print statement: >> >> >>> print DynkinDiagram("A3") >> 0---0---0 >> 1 2 3 >> >> Now, I just found out how in python 3.x print is now a function, so you >> need print(DynkinDiagram("A3")) which is why the doctests are failing for >> python 3.2 and 3.3. I'm not sure how to fix this, as it seems to me, no >> matter what, the doctests will either fail for 2.6 and 2.7 or 3.2 and 3.3. >> >> Thoughts? > > > My preference is to *never* have methods that don't return something. When > I want a function to print, I return a string. > I think it is more pythonic to avoid methods that simply print something. > > Besides, if you return a string then you won't run into these doctest > issues:-) > > > >> -- >> You received this message because you are subscribed to the Google Groups >> "sympy" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sympy+unsubscr...@googlegroups.com. >> To post to this group, send email to sympy@googlegroups.com. >> Visit this group at http://groups.google.com/group/sympy. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.