[sage-support] Re: Is there an efficient method of producing indexed variables?

2010-04-02 Thread Alec Mihailovs
On Apr 2, 1:45 pm, Franco Saliola sali...@gmail.com wrote: sage: a = SymbolicVariables('a') ... Here is a very simple implementation of SymbolicVariables.     class SymbolicVariables(SageObject):         def __init__(self, prefix='x'):             self._prefix = prefix         def

[sage-support] Re: Is there an efficient method of producing indexed variables?

2010-04-01 Thread scott.h
That did exactly what I wanted to do! Thank you very much for taking the time to reply. The command C = [var(C_%s % i) for i in range(n)] in particular is what I was looking for. I think I can glean how %s works from how you've used it and will experiment a little. However if you, or anyone

Re: [sage-support] Re: Is there an efficient method of producing indexed variables?

2010-04-01 Thread Mike Hansen
On Thu, Apr 1, 2010 at 9:21 PM, scott.h scott.he...@gmail.com wrote: That did exactly what I wanted to do!  Thank you very much for taking the time to reply.  The command C = [var(C_%s % i) for i in range(n)] in particular is what I was looking for.  I think I can glean how %s works from how

Re: [sage-support] Re: Is there an efficient method of producing indexed variables?

2010-04-01 Thread Robert Bradshaw
On Apr 1, 2010, at 9:21 PM, scott.h wrote: That did exactly what I wanted to do! Thank you very much for taking the time to reply. The command C = [var(C_%s % i) for i in range(n)] in particular is what I was looking for. I think I can glean how %s works from how you've used it and will

[sage-support] Re: Is there an efficient method of producing indexed variables?

2010-04-01 Thread scott.h
Perfect, thanks again! On Apr 1, 9:24 pm, Robert Bradshaw rober...@math.washington.edu wrote: On Apr 1, 2010, at 9:21 PM, scott.h wrote: That did exactly what I wanted to do!  Thank you very much for taking the time to reply.  The command C = [var(C_%s % i) for i in range(n)] in