Strange range

Marko Rauhamaa marko at pacujo.net
Sun Apr 3 02:58:26 EDT 2016


Stephen Hansen <me+python at ixokai.io>:

> On Sat, Apr 2, 2016, at 02:40 PM, Marko Rauhamaa wrote:
>> That's why I was looking for counterexamples in the standard library
>
> This entire bent of an argument seems flawed to me.
>
> The standard library has never been a beacon for best practices or
> idiomatic uses of Python.

It's an obvious corpus of Python code not written by me that's readily
available on my computer. An argument was made that range() has varied
uses. I was trying to find those varied uses.

> That a use exists in the standard library, or that one does not,
> doesn't really tell you anything meaningful about Python itself or
> good practices with the language. The standard library is under
> uniquely conservative constraints that enshrine compatibility and
> reliability from one point release to another over any kind of
> innovation.

What you seem to be saying is that range() used to be an iterator but
has since ascended to the status of an iterable.

> Most code exists outside the stdlib.

Which should then make it easy for you to point out the kinds of
counterexamples I was looking for.


Marko



More information about the Python-list mailing list