On Mon, Nov 19, 2018 at 6:09 PM Steven D'Aprano <st...@pearwood.info> wrote: > > On Mon, Nov 19, 2018 at 05:09:25PM -0800, danish bluecheese wrote: > > I think it is kind of useless effort. If somebody using range() then > > probably knows about it. > > For experienced users, sure, but this is an enhancement to help > beginners who may be confused by the half-open end points. > > Even non-beginners may find it nice to be able to easily see the end > points when the step size is not 1. > > If range objects had this, I'd use it in the REPL to check the end > points. Sure, I could convert to a list and take a slice, but giving the > object a nicer print output makes less work for the user.
I feel like the kind of users who would benefit the most from this are exactly the same users who are baffled by the distinction between str() and repr() and which one is used when, and thus would struggle to benefit from it? -n -- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/