Range Operation pre-PEP
Denys Duchier
Denys.Duchier at ps.uni-sb.de
Wed May 9 15:51:03 EDT 2001
"Alex Martelli" <aleaxit at yahoo.com> writes:
> I like the ideas of brackets for that.
> for i in [a:b]
> just looks so neat...:-).
That was the subject of PEP 204 (Range Literals) which was rejected.
I don't know why. (the stated open issues should simply all be
answered with: "no magic!").
It seems to me that it would be rather neat to extend the list
comprehension idea to be able to create an iterator rather than a
list. I shudder at the idea of proposing syntax for that, but using
[| ... |] instead of [ ... ] might work.
Now excuse me while I run for cover... :-)
--
Dr. Denys Duchier Denys.Duchier at ps.uni-sb.de
Forschungsbereich Programmiersysteme (Programming Systems Lab)
Universitaet des Saarlandes, Geb. 45 http://www.ps.uni-sb.de/~duchier
Postfach 15 11 50 Phone: +49 681 302 5618
66041 Saarbruecken, Germany Fax: +49 681 302 5615
More information about the Python-list
mailing list