On 2017-12-05 01:37, Jason Maldonis wrote:
[snip]

So I guess the conclusion (as far as I can tell) is that:  `my_string[:n]`
is more convenient than `my_string[:min(n, len(my_string))]`, and that
sounds okay enough to me.

If I'm being completely honest I kinda like the logical explicitness of the
latter, but it's way less convenient. And I'm 100% sure the people who made
this decision are incredibly smart, and I certainly trust their decision.
Thanks everyone for the responses.

The first sentence of this paragraph can be summarised as "Practicality beats purity". It's in the Zen.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to