gh-154746: Update doc string for collections.Counter - #154792
Conversation
Added a note that initializing a `Counter` from a `Mapping` or `Counter` will have different behaviour than initializing from other `Iterable`s.
Updated the wording as it had been unclear.
|
I'm going to merge this on the basis that it's already in the canonical RST docs. If someone (primarily Raymond) strongly disagrees about documenting this, feel free to send a revert and tag me for a review. |
|
Thanks @brass75 for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
GH-154793 is a backport of this pull request to the 3.15 branch. |
|
GH-154794 is a backport of this pull request to the 3.14 branch. |
|
GH-154795 is a backport of this pull request to the 3.13 branch. |
|
|
|
|
@ZeroIntensity I don't think there's anything I can do about:
|
|
Yeah, not your fault. We've been discussing this internally today. It should hopefully be resolved soon. |
…) (GH-154793) Added a note to `collections.Counter`'s docstring that initializing a `Counter` from a `Mapping` or `Counter` will have different behaviour than initializing from other `Iterable`s. This behaviour was already documented in the canonical docs but is missing from the help() output. (cherry picked from commit 22a123f) Co-authored-by: Dan Shernicoff <dan@brassnet.biz>
…) (GH-154794) Added a note to `collections.Counter`'s docstring that initializing a `Counter` from a `Mapping` or `Counter` will have different behaviour than initializing from other `Iterable`s. This behaviour was already documented in the canonical docs but is missing from the help() output. (cherry picked from commit 22a123f) Co-authored-by: Dan Shernicoff <dan@brassnet.biz>
…) (GH-154795) Added a note to `collections.Counter`'s docstring that initializing a `Counter` from a `Mapping` or `Counter` will have different behaviour than initializing from other `Iterable`s. This behaviour was already documented in the canonical docs but is missing from the help() output. (cherry picked from commit 22a123f) Co-authored-by: Dan Shernicoff <dan@brassnet.biz>
|
|
|
|
|
Issue #154746
Added a note to
collections.Counter's doc string that initializing aCounterfrom aMappingorCounterwill have different behaviour than initializing from otherIterables.This behaviour is already documented in the docs but is missing from the
help()output.collections.Counter#154746