Skip to content

Incorrect counting in doc string #134648

Closed as not planned
Closed as not planned
@mohamamdsajadi

Description

@mohamamdsajadi

Bug report

Bug description:

# Add a code block here, if required
``` >>>
here is a part of python doc string for Counter class in Collection module. there is a miscounting ! the count of letter a was 5 and after adding by one it became 7 instead of 6 !
 c['a']                          # count of letter 'a'
    5
    >>> for elem in 'shazam':           # update counts from an iterable
    ...     c[elem] += 1                # by adding 1 to each element's count
    >>> c['a']                          # now there are seven 'a'
    7

### CPython versions tested on:

3.10

### Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions