Skip to content

Commit 66da01c

Browse files
committed
use symbol over sym as sym could be mistaken for symmetry?
1 parent c735cca commit 66da01c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pymatgen/core/periodic_table.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ def __init__(self, symbol: SpeciesLike) -> None:
145145

146146
self._is_named_isotope = data.get("Is named isotope", False)
147147
if self._is_named_isotope:
148-
for sym, info in _PT_DATA.items():
148+
for symbol, info in _PT_DATA.items():
149149
if info["Atomic no"] == self.Z and not info.get("Is named isotope", False):
150-
self.symbol = sym
150+
self.symbol = symbol
151151
break
152152
# For specified/named isotopes, treat the same as named element
153153
# (the most common isotope). Then we pad the data block with the
@@ -611,10 +611,10 @@ def from_Z(Z: int, A: int | None = None) -> Element:
611611
Returns:
612612
Element with atomic number Z.
613613
"""
614-
for sym, data in _PT_DATA.items():
614+
for symbol, data in _PT_DATA.items():
615615
atomic_mass_num = data.get("Atomic mass no") if A else None
616616
if data["Atomic no"] == Z and atomic_mass_num == A:
617-
return Element(sym)
617+
return Element(symbol)
618618

619619
raise ValueError(f"Unexpected atomic number {Z=}")
620620

@@ -659,8 +659,8 @@ def from_row_and_group(row: int, group: int) -> Element:
659659
Note:
660660
The 18 group number system is used, i.e. noble gases are group 18.
661661
"""
662-
for sym in _PT_DATA:
663-
el = Element(sym)
662+
for symbol in _PT_DATA:
663+
el = Element(symbol)
664664
if 57 <= el.Z <= 71:
665665
el_pseudo_row = 8
666666
el_pseudo_group = (el.Z - 54) % 32

0 commit comments

Comments
 (0)