Skip to content

Commit 482efbf

Browse files
committed
>> added comment to Session.__setattr__
1 parent 58d3832 commit 482efbf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

larray/core/session.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ def __getattr__(self, key):
328328
raise AttributeError("'{}' object has no attribute '{}'".format(self.__class__.__name__, key))
329329

330330
def __setattr__(self, key, value):
331+
# the condition below is needed because, unlike __getattr__, __setattr__ is called before any property
332+
# see https://stackoverflow.com/a/15751159
331333
if key == 'meta':
332334
super().__setattr__(key, value)
333335
else:

0 commit comments

Comments
 (0)