-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3 tests fail #84
Comments
@yurivict thanks for the report. This was hard to reproduce. It doesn't show up if The problem is with the delayed loader here: periodictable/periodictable/core.py Line 132 in 4ff037b
When the The following will fix it: diff --git a/periodictable/core.py b/periodictable/core.py
index 7324eea..2951c92 100644
--- a/periodictable/core.py
+++ b/periodictable/core.py
@@ -130,6 +130,11 @@ def delayed_load(all_props, loader, element=True, isotope=False, ion=False):
def setfn(el, value):
#print "set", el, propname, value
clearprops()
+ # Since the property is now cleared the loader will not be
+ # triggered in the getter for a different element, so call it here.
+ # This will update the default table even when the property is
+ # being initialized in a private table.
+ loader()
setattr(el, propname, value)
return setfn Note sure if I'll produce a new 1.7 release before the 2.0 release waiting on master. |
Version: 1.7.1
python-3.11
FreeBSD 14.1
The text was updated successfully, but these errors were encountered: