Skip to content

Commit a278ade

Browse files
committed
Override dict.copy method on AttributeDict
The copy implementation of dict always returns a dict instead of copying the current dict subclass.
1 parent 1844178 commit a278ade

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sc2reader/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,9 @@ def __getattr__(self, name):
497497
def __setattr__(self, name, value):
498498
self[name] = value
499499

500+
def copy(self):
501+
return AttributeDict(super(AttributeDict,self).copy())
502+
500503
def read_header(file):
501504
''' Read the file as a byte stream according to the documentation found at:
502505
http://wiki.devklog.net/index.php?title=The_MoPaQ_Archive_Format

0 commit comments

Comments
 (0)