On 7/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Also, bringing it back more on-topic, what should the value of this
> expression be?
>
> 4 in range(0, 10, 3)
>
> That is, are we treating range() as a set or an interval? Maybe I missed
> earlier messages in this thread where this was discussed, but part of the
> discussion focused on this construct
>
> 0 <= 4 < 10
>
> where there was no option to provide a step size. Also, this particular
> notation screams out interval, not set, to me.
You missed it -- it should definitely be equivalent to
4 in list(range(0, 10, 3))
i.e.
4 in [0, 4, 8]
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com