I guess we shouldn't have methods on objects named "next" unless they are iterators.
Aaron Meurer On Sat, Dec 24, 2011 at 1:07 PM, Chris Smith <[email protected]> wrote: > OK, if there is another argument besides self then the method is not > renamed; but calls to the method that *look* like the iterator's `next()` > method get re-written with the next function...and since that isn't defined > then failures occur: > > File "...py3k-sympy\sympy\combinatorics\prufer.py", line 284, > in sympy.combinatorics.prufer.Prufer.next > Failed example: > b = next(a) > Exception raised: > Traceback (most recent call last): > File "C:\Python32\lib\doctest.py", line 1253, in __run > compileflags, 1), test.globs) > File "<doctest sympy.combinatorics.prufer.Prufer.next[2]>", line 1, in > <mo > dule> > b = next(a) > TypeError: Prufer object is not an iterator > > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
