2016-05-07から1日間の記事一覧
Effective Python から item31 import weakref class Grade(object): def __init__(self): self._values = weakref.WeakKeyDictionary() print(self._values) def __get__(self, instance, instance_type): if instance is None: return self print(instance…