3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

ChannelState: add copy and __contains__ methods

This commit is contained in:
James Lu 2017-08-06 18:04:46 -07:00
parent cb36e29b92
commit c9c0e0a85b

View File

@ -70,6 +70,12 @@ class ChannelState(collections.abc.MutableMapping):
def __len__(self):
return len(self._data)
def copy(self, *args, **kwargs):
return self._data.copy(*args, **kwargs)
def __contains__(self, key):
return self._data.__contains__(self._keymangle(key))
class PyLinkNetworkCore(utils.DeprecatedAttributesObject, utils.CamelCaseToSnakeCase):
"""Base IRC object for PyLink."""