On Sun, Apr 15, 2018 at 8:39 PM Raymond Hettinger <
raymond.hettin...@gmail.com> wrote:

> FWIW, Counter is explicitly documented to support the four multiset-style
> mathematical operations discussed in Knuth TAOCP Volume II section 4.6.3
> exercise 19:
>

Wow, I never noticed "&" and "|" -- I guess when I got to "Common patterns
for working with" in the documentation, I figured that there wouldn't be
any new methods introduced after that and I stopped reading.

>
> it would be a bit weird and disorienting for the arithmetic operators to
> have two different signatures:
>
>     <counter> += <counter>
>     <counter> -= <counter>
>     <counter> *= <scalar>
>     <counter> /= <scalar>
>

Is it weird and disorienting to have:

<str> += <str>
<str> *= <scalar>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to