Open DanielYang59 opened 1 week ago
I agree isotopes shouldn't appear as part of default behavior.
That was an oversight on my part, thanks for the fix! Also agree that enumerating over elements shouldn't list isotopes. Maybe adding a method to Element
to show people which isotopes are available would be useful tho?
That was an oversight on my part, thanks for the fix!
No problem at all, cannot blame anyone, it's the test that is missing, together we improve test coverage :)
Maybe adding a method to Element to show people which isotopes are available would be useful tho?
Fair point, is current implementation looking good to you @esoteric-ephemera (I don't have much experience overwriting an Enum
so not sure if there's any pitfall like builtin dict/list/...
, do review with a pinch of salt)?
Element.named_isotopes # ---> (Element.D, Element.T)
@janosh I believe you're very experienced with Enum
(while I'm not), perhaps you could help me double-check the implementation?
Summary
core.Element
, to fix #4178, rationale:Element
to behave similarly to looping through the periodic table, i.e. isotopes should not sneak in here, do you like this idea @esoteric-ephemera?property
Element.named_isotopes
for all named_isotopes so far.core.periodic_table
docstring (remove non-existentPeriodicTable
class).This would be a breaking change (also might be called a fix), so comments are hugely appreciated.
Before
Now (nothing special, just skip isotopes of hydrogen)