[Python-ideas] Re: A standard library Multiset implementation?

2022-08-20 Thread Brian Gladman
Thank you for your advice, Raymond, which I much appreciate. I have started to use the more_itertools package. I probably also need to take Counter() more seriously but I have shied away from it until now, fearing that it might be more focussed on 'counting' than on 'multiset operations' (i.e

[Python-ideas] Re: A standard library Multiset implementation?

2022-08-20 Thread Christopher Barker
On Sat, Aug 20, 2022 at 9:07 AM Brian Gladman wrote: > I probably also need to take Counter() more seriously but I have shied > away from it until now, fearing that it might be more focussed on > 'counting' than on 'multiset operations' I think you correct about that — Counter can be a way to b

[Python-ideas] Re: A standard library Multiset implementation?

2022-08-20 Thread Brian Gladman
Christopher Barker wrote: > (i.e. such as the API here: https://multiset.readthedocs.io/en/stable/). > It seems that’s just what you want. Honestly, despite the idea of > “batteries included”, it is very common these days to need a third party > lib. > If that package meets your needs, then great.

[Python-ideas] On "batteries included" [was: standard library Multiset ...]

2022-08-20 Thread Stephen J. Turnbull
Christopher Barker writes: > It seems that’s just what you want. Honestly, despite the idea of > “batteries included”, it is very common these days to need a third party > lib. Just because your Gameboy came with batteries, doesn't mean that your favorite game was included. The idea of "batte

[Python-ideas] Re: A standard library Multiset implementation?

2022-08-20 Thread Christopher Barker
On Sat, Aug 20, 2022 at 10:22 AM Brian Gladman wrote: > My main concern is not that I can't find a multiset package that meets my > needs, but rather that I have to look for and then integrate the > combinatorial algorithms that I need to use with multisets. > > With 'sets and itertools' I have t