On the bug tracker, there is a proposal to enhance range objects so that
printing them will display a snapshot of the values included, including
the end points. For example:
print(range(10))
currently displays "range(10)". The proposal is for the __str__ method
to instead return "".
https://b
I think it is kind of useless effort. If somebody using range() then
probably knows about it. Also there are some workarounds inspect range()
result already.
Like:
*range(10) or if it is big: *range(1000)[:10]
On Mon, Nov 19, 2018 at 4:25 PM Steven D'Aprano wrote:
> On the bug tracker, there
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
On 2018-11-20 00:19, Steven D'Aprano wrote:
On the bug tracker, there is a proposal to enhance range objects so that
printing them will display a snapshot of the values included, including
the end points. For example:
print(range(10))
currently displays "range(10)". The proposal is for the __st
On Tue, Nov 20, 2018 at 1:10 PM Steven D'Aprano 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
>
On Mon, Nov 19, 2018 at 6:09 PM Steven D'Aprano 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
>