Is it possible to merge xrange and slice?

Matimus mccredie at gmail.com
Mon Apr 30 16:01:52 EDT 2007


> Which problems am I overlooking that prevent this?

1. Generators and slices serve two distinctly different tasks.
2. They may have the similar interfaces, but are implemented
differently. Each optimized for its specific task.

You are essentially asking "Why not do it?", to which I respond "Why
do it?". How does this consolidation of features improve Python?




More information about the Python-list mailing list