Skip to content

Commit

Permalink
Merge pull request #2294 from Kodiologist/slotless
Browse files Browse the repository at this point in the history
Remove `Keyword.__slots__`
  • Loading branch information
Kodiologist committed May 29, 2022
2 parents 89f7dc5 + b339c20 commit 20d62c2
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions hy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ class Keyword(Object):
mangling is performed.
"""

__slots__ = ["name"]
__match_args__ = ("name",)

def __init__(self, value, from_parser=False):
Expand Down Expand Up @@ -311,19 +310,6 @@ def __call__(self, data, default=_sentinel):
raise
return default

# __getstate__ and __setstate__ are required for Pickle protocol
# 0, because we have __slots__.
def __getstate__(self):
return {
k: getattr(self, k)
for k in self.properties + self.__slots__
if hasattr(self, k)
}

def __setstate__(self, state):
for k, v in state.items():
setattr(self, k, v)


def strip_digit_separators(number):
# Don't strip a _ or , if it's the first character, as _42 and
Expand Down

0 comments on commit 20d62c2

Please sign in to comment.