[Python-ideas] Re: List get/pop

2023-06-16 Thread Christopher Barker
On Fri, Jun 16, 2023 at 4:20 AM Dom Grigonis wrote: > Just to add. I think same methods would be useful to have for strings as > well. > strings are immutable, so `pop` is out. As for `get` -- it *could* be added to the sequence ABC, but very much doubt that will ever happen -- adding something

[Python-ideas] Re: List get/pop

2023-06-16 Thread Dom Grigonis
Just to add. I think same methods would be useful to have for strings as well. > On 14 Jun 2023, at 23:28, Dom Grigonis wrote: > > Yes, > 1. adding keyword argument for `pop` > 2. implementing `get` method as it doesn’t exist at all > * This wouldn’t break anything for sure. Well… theoreticall

[Python-ideas] Re: List get/pop

2023-06-14 Thread Dom Grigonis
Yes, 1. adding keyword argument for `pop` 2. implementing `get` method as it doesn’t exist at all * This wouldn’t break anything for sure. Well… theoretically could, but I find it hard to imagine anyone has written such code. I like PEP 463. Looks simple and intuitive. > On 14 Jun 2023, at 23

[Python-ideas] Re: List get/pop

2023-06-14 Thread Chris Angelico
On Thu, 15 Jun 2023 at 06:04, Dom Grigonis wrote: > So following Chris’ logic... > If there are 10,000,000 python users on Stack… > And we assume, that every user encounters such need at least 2 times a year > (being very speculative here, would say conservative?). That was me being VERY generou