Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

serhiy-storchaka
Copy link
Member

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

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

https://bugs.python.org/issue27541

Copy link
Contributor

@rhettinger rhettinger left a comment

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
Copy link
Member Author

serhiy-storchaka commented Sep 17, 2017

Maybe make count and repeat not subclassable?

@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants