Re: Parsing numeric ranges

2011-03-03 Thread Seldon
On 02/25/2011 10:27 AM, Seldon wrote: Hi all, I have to convert integer ranges expressed in a popular "compact" notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). Is there any library for doing such kind of things or I have to write it from scratch ? In

Re: Parsing numeric ranges

2011-02-25 Thread Suneel Kingrani
__ From: Simon Brunning To: Seldon Cc: python-list@python.org Sent: Fri, 25 February, 2011 10:36:10 PM Subject: Re: Parsing numeric ranges On 25 February 2011 09:27, Seldon wrote: > Hi all, > I have to convert integer ranges expressed in a popular "compact" notat

Re: Parsing numeric ranges

2011-02-25 Thread Simon Brunning
On 25 February 2011 09:27, Seldon wrote: > Hi all, > I have to convert integer ranges expressed in a popular "compact" notation > (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. > 2,5,7,20,21,22,41). > > Is there any library for doing such kind of things or I have to write it > from

Re: Parsing numeric ranges

2011-02-25 Thread Seldon
On 02/25/2011 10:44 AM, Alain Ketterlin wrote: Seldon writes: I have to convert integer ranges expressed in a popular "compact" notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). What form does the input have? Are they strings, or some other representa

Re: Parsing numeric ranges

2011-02-25 Thread Alain Ketterlin
Seldon writes: > I have to convert integer ranges expressed in a popular "compact" > notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. > 2,5,7,20,21,22,41). What form does the input have? Are they strings, or some other representation? > Is there any library for doing such

Re: Parsing numeric ranges

2011-02-25 Thread Corey Richardson
On 02/25/2011 04:27 AM, Seldon wrote: > Hi all, > I have to convert integer ranges expressed in a popular "compact" > notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. > 2,5,7,20,21,22,41). > > Is there any library for doing such kind of things or I have to write it > from

Parsing numeric ranges

2011-02-25 Thread Seldon
Hi all, I have to convert integer ranges expressed in a popular "compact" notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). Is there any library for doing such kind of things or I have to write it from scratch ? Thanks in advance for any answers. Se