Thank you for telling me about needing a call to Symbol.

It is funny that cse worked all the time without it, and bleeding edge sympy
worked most of the time without it.

My iterator returns tt00, tt01,...

numbered_symobols returns tt0, tt1,...

This made a difference for me because later on I want to replace the tt 
guys.

So for example if I replaced t1 by something I would clobber t11, t12 etc.
That is why I made my own iterator.

    Larry Wigton


On Wednesday, September 26, 2012 10:42:21 AM UTC-7, smichr wrote:
>
> > class Myname: 
> >     def __init__(self): 
> >        self.value = -1 
> >     def __iter__(self): 
> >        return self 
> >     def next(self): 
> >        self.value += 1 
> >        val = '%s%.2d' % ('tt',self.value) 
>
> That should be `Symbol('%s%.2d' % ('tt',self.value))`; note that 
> numbered_symbols('tt') will give you the same iterator. 
>
> ``` 
> >>> numbered_symbols('tt') 
> <generator object numbered_symbols at 0xb20039c> 
> >>> [_.next() for i in range(4)] 
> [tt0, tt1, tt2, tt3] 
>
> ``` 
> /Chris 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/cV9HCa2UsPMJ.
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.

Reply via email to