Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 29c7e28

Browse files
authored
Merge pull request #10020 from anntzer/container-repr
Let Container reprs report the actual subtype.
2 parents f433e2c + 12438e8 commit 29c7e28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/container.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class Container(tuple):
1313
"""
1414

1515
def __repr__(self):
16-
return "<Container object of %d artists>" % (len(self))
16+
return ("<{} object of {} artists>"
17+
.format(type(self).__name__, len(self)))
1718

1819
def __new__(cls, *kl, **kwargs):
1920
return tuple.__new__(cls, kl[0])

0 commit comments

Comments
 (0)