Hi,

On Wed, Aug 18, 2010 at 02:15:05AM -0700, smichr wrote:
> 
> 
> On Aug 17, 6:32 pm, Vinzent Steinberg
> <vinzent.steinb...@googlemail.com> wrote:
> > 2010/8/17 Aaron S. Meurer <asmeu...@gmail.com>:
> >
> > > Well, here's the problem with the spaceless option:
> >
> > >>>> var('ab cd ef')
> > > (ab, cd, ef)
> > >>>> var('ab cd')
> > > (ab, cd)
> > >>>> var('ab')
> > > (a, b)
> >
> > You could still do
> >
> > >>> var('ab ')
> >
> > ab
> >
> 
> I don't see this as a problem: if there's no delimiter you get
> symbols; if there is a delimiter then you get what is between
> delimiters. As Vinzent points out, that delimiter can be a space. It
> can also be a comma: var('abc,').
> 
> The problem with from sympy.abc import * is that you lose access to
> things like S(1) since S becomes a symbol.
> 
> Having grown up in Fortran, I like the a:c option. I would use that
> often as var('a:c x:z'). I think that is the best suggest so far. It
> uses a delimiter that can't be confused with a symbol and makes it
> pretty explicit what is intended. We could also use the "-" as in
> var('a-c'). So, just as you can use space or comma for delimiters,
> perhaps we could allow ":" or "-" as range delimiters (though : is
> more pythonic).
> 

The syntax was added in polys11 branch, e.g.:

In [1]: symbols('x:z')
Out[1]: (x, y, z)

In [2]: symbols('a:d,x:z')
Out[2]: (a, b, c, d, x, y, z)

In [3]: symbols(('a:d', 'x:z'))
Out[3]: ((a, b, c, d), (x, y, z))

In [4]: symbols('xx:zz')
(...)
ValueError: 'xx:zz' is not a valid symbol range specification

(for now only symbols of length one are allowed, and only colon).

> -- 
> You received this message because you are subscribed to the Google Groups 
> "sympy-patches" group.
> To post to this group, send email to sympy-patc...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sympy-patches+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sympy-patches?hl=en.
> 

-- 
Mateusz

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to