Skip to content

Commit f564944

Browse files
committed
space/indent docstring in Structure __setitem__
1 parent d0f5f92 commit f564944

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/pymatgen/core/structure.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4242,26 +4242,28 @@ def __setitem__(
42424242
Examples:
42434243
structure[0] = "Fe"
42444244
structure[0] = Element("Fe")
4245-
both replaces the species only.
4245+
both replaces the species only.
4246+
42464247
structure[0] = "Fe", [0.5, 0.5, 0.5]
4247-
Replaces site and *fractional* coordinates. Any properties
4248-
are inherited from current site.
4248+
Replaces site and *fractional* coordinates. Any properties
4249+
are inherited from current site.
4250+
42494251
structure[0] = "Fe", [0.5, 0.5, 0.5], spin=2
4250-
Replaces site and *fractional* coordinates and properties.
4252+
Replaces site and *fractional* coordinates and properties.
42514253
42524254
structure[(0, 2, 3)] = "Fe"
4253-
Replaces sites 0, 2 and 3 with Fe.
4255+
Replaces sites 0, 2 and 3 with Fe.
42544256
42554257
structure[::2] = "Fe"
4256-
Replaces all even index sites with Fe.
4258+
Replaces all even index sites with Fe.
42574259
42584260
structure["Mn"] = "Fe"
4259-
Replaces all Mn in the structure with Fe. This is
4260-
a short form for the more complex replace_species.
4261+
Replaces all Mn in the structure with Fe. This is
4262+
a short form for the more complex replace_species.
42614263
42624264
structure["Mn"] = "Fe0.5Co0.5"
4263-
Replaces all Mn in the structure with Fe: 0.5, Co: 0.5, i.e.,
4264-
creates a disordered structure!
4265+
Replaces all Mn in the structure with Fe: 0.5, Co: 0.5, i.e.,
4266+
creates a disordered structure!
42654267
"""
42664268
if isinstance(idx, int):
42674269
indices = [idx]

0 commit comments

Comments
 (0)