Use __slots__ for fast attribute access
This commit is contained in:

committed by
Todd Gamblin

parent
b6c8779772
commit
2b3f350071
@@ -486,6 +486,8 @@ class HashableMap(MutableMapping):
|
||||
"""This is a hashable, comparable dictionary. Hash is performed on
|
||||
a tuple of the values in the dictionary."""
|
||||
|
||||
__slots__ = 'dict',
|
||||
|
||||
def __init__(self):
|
||||
self.dict = {}
|
||||
|
||||
|
Reference in New Issue
Block a user