Skip to content

bpo-27541: Reprs of subclasses of some classes now contain actual type name. - #3631

Merged
serhiy-storchaka merged 1 commit into
python:masterfrom
serhiy-storchaka:collections-repr-type-name
Sep 21, 2017
Merged

serhiy-storchaka merged 1 commit into
python:masterfrom
serhiy-storchaka:collections-repr-type-name

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 17, 2017 •

Copy link
Copy Markdown
Member

Affected classes are bytearray, array, deque, defaultdict, count and repeat.

https://bugs.python.org/issue27541

@rhettinger rhettinger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only one I have misgivings about is itertools.count() doesn't seem to be meaningfully subclassable. But changing the repr for count doesn't have any negative effect, so +0 for changing it.

…e name.

Affected classes are bytearray, array, deque, defaultdict, count and repeat.
@serhiy-storchaka

serhiy-storchaka commented Sep 17, 2017 •

Copy link
Copy Markdown
Member Author

Maybe make count and repeat not subclassable?

@serhiy-storchaka
serhiy-storchaka force-pushed the collections-repr-type-name branch from 9df3e22 to 6e75a20 Compare September 17, 2017 18:16
@serhiy-storchaka
serhiy-storchaka merged commit b3a7796 into python:master Sep 21, 2017
@serhiy-storchaka
serhiy-storchaka deleted the collections-repr-type-name branch September 21, 2017 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants