MCPcopy Create free account
hub / github.com/ActiveState/code / copy

Method copy

recipes/Python/576611_Counter_class/recipe-576611.py:93–95  ·  view source on GitHub ↗

Like dict.copy() but returns a Counter instance instead of a dict.

(self)

Source from the content-addressed store, hash-verified

91 self.update(kwds)
92
93 def copy(self):
94 'Like dict.copy() but returns a Counter instance instead of a dict.'
95 return Counter(self)
96
97 def __delitem__(self, elem):
98 'Like dict.__delitem__() but does not raise KeyError for missing values.'

Callers 5

DumpfileFunction · 0.45
ElementFunction · 0.45
SubElementFunction · 0.45
test_instanceMethod · 0.45
test_copyMethod · 0.45

Calls 1

CounterClass · 0.70

Tested by 2

test_instanceMethod · 0.36
test_copyMethod · 0.36