New submission from Julien Palard <julien+pyt...@palard.fr>:

This morning I was teaching Python (again and again), and again I was thinking 
we could do better about the representation of ranges.

Typically in the current repr of ranges we do not see that the end is excluded:

>>> range(10)
range(0, 10)

However it has the (little?) benefit of respecting the "repr gives valid 
Python".

I propose to change it to:

>>> range(10)
<range object [0, 1, ..., 8, 9]>

----------
messages: 329531
nosy: mdk
priority: normal
severity: normal
status: open
title: Range repr could be better
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35200>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to