Hacker News new | ask | show | jobs
by jgalt212 321 days ago
why not inside of __init__

  self.accessed_keys = set()
instead of

    @property
    def accessed_keys(self):
        return self._accessed_keys
1 comments

With the @property you only get the “getter” and not the “setter”.
But that doesn't accomplish much, because you can still do: `d.accessed_keys.add('foo')`.
That’s right