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

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.

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 scratch

Re: Parsing numeric ranges

2011-02-25 Thread Alain Ketterlin
Seldon sel...@katamail.it 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

Re: Parsing numeric ranges

2011-02-25 Thread Seldon
On 02/25/2011 10:44 AM, Alain Ketterlin wrote: Seldonsel...@katamail.it 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

Re: Parsing numeric ranges

2011-02-25 Thread Simon Brunning
On 25 February 2011 09:27, Seldon sel...@katamail.it 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

Re: Parsing numeric ranges

2011-02-25 Thread Suneel Kingrani
Brunning si...@brunningonline.net To: Seldon sel...@katamail.it 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 sel...@katamail.it wrote: Hi all, I have to convert integer ranges expressed in a popular