Roundup Tracker - Issues


Author schlatterbeck
Recipients ajaksu2, ber, richard, schlatterbeck, tobias-herp
Date 2009-07-15.10:43:49
Message-id <>
In-reply-to <>
On Wed, Jul 15, 2009 at 08:35:34AM +0000, Tobias wrote:
> Tobias <> added the comment:
> I forgot to mention that we agree /not/ to support an 'and' operator,
> because
> - it is not necessary; everone can work out the result himself
> - the popular meaning of 'and' contradicts the mathematical meaning.
> Thus, an 'and' operator would cause confusion.


> Now to the combination of sets ("sets of numbers", like Ralf calls it)
> and ranges.
> Ralf would like to support things like
>   1 or 2 or 3 or 4;5
> and calls it a "set of ranges".  I take into consideration that
> - the 'or' keyword is interchangeable with the /optional/ comma

I've repeatedly said that -- since the comma should be a decimal comma
too, I DO NOT WANT the comma to mean "or".

Same for blank. I DO NOT WANT a space to implicitly mean "or".



> My opinion is:
> - the "1 or 2 or 3" part -- or "1 2 3", "1, 2, 3" -- is a /set/.
> - a set is a totally different beast than a range:
>   * a set has /members/ while a range has /limits/
>   * thus, a set will always contain the listed values;
>     a (a,b) range won't
>   * a set can by its very nature contain 1, 2 or more elements;
>     it doesn't need to "degenerate" to have one member only.
> And, most important, I invoke the Zen of Python, "explicit is better
> than implicit":

If you see ranges as things that can contain just one number (as it is
currently implemented in you won't need the sets.

Zen of Python:
Beautiful is better than ugly
Simple is better than complex
Readability counts
Special cases aren't special enough to break the rules
There should be one-- and preferably only one --obvious way to do it
If the implementation is hard to explain, it's a bad idea

So lets drop sets of numbers.

Or to fix a misconception: We don't need sets of numbers for full

> Thus, my suggestion for this combination is:
>   {1, 2, 3} or [4; 5]
>   {1 2 3} or [4; 5]
>   {1 2 3},[4;5]          # shortest version
> Maybe I could live with
>   1 or 2 or 3 or [4; 5]
> as well; but in any case the /range/ must be made explicit in such
> combinations.

I find that this syntax violates the above-mentioned "Zen of Python"
guidelines. All of them. We don't need explicitness for a special case.


Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  Fax:   +43/2243/26465-23
Reichergasse 131                        www:
A-3411 Weidling                         email:
osAlliance member                       email:
Date User Action Args
2009-07-15 10:43:49schlatterbecksetrecipients: + schlatterbeck, richard, ber, tobias-herp, ajaksu2
2009-07-15 10:43:49schlatterbecklinkissue1182919 messages
2009-07-15 10:43:49schlatterbeckcreate