Skip to content

Commit b7d6dbe

Browse files
author
Deepak Mewar
committed
Updated documentation for identifier aliases
1 parent a752965 commit b7d6dbe

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

‎docs/source/identifiers.rst‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ enumerated list of options for defining, for example:
1111
a neutron, or a photon.
1212
- Plasma heating may come from neutral beam injection, electron cyclotron heating,
1313
ion cyclotron heating, lower hybrid heating, alpha particles.
14-
- Chemical elements and isotopes, which may have alternative naming conventions
15-
supported through aliases (e.g., "235U" and "U_235" for Uranium 235).
14+
- These may have alternative naming conventions supported through aliases
15+
(e.g., "235U" and "U_235" for Uranium 235).
1616

1717
Identifiers are a list of possible valid labels. Each label has up to four
1818
representations:
@@ -127,9 +127,18 @@ Identifier aliases
127127

128128
Some identifiers may have aliases defined in the Data Dictionary. An alias provides
129129
an alternative name for accessing the same identifier value. This is particularly
130-
useful for chemical elements and isotopes where multiple naming conventions exist.
130+
useful where multiple naming conventions exist.
131+
132+
Aliases can be accessed in the same ways as canonical names.
133+
134+
Aliases starting with a number can be accessible using ["235U"] but not
135+
material_identifier.235U because of Python construct limitation.
136+
137+
Aliases that begin with a number (e.g., 235U) cannot be accessed using dot notation
138+
(e.g., material_identifier.235U) due to Python’s syntax restrictions. Instead, such
139+
aliases must be accessed using dictionary-style indexing,
140+
for example: material_identifier["235U"].
131141

132-
Aliases can be accessed in the same ways as canonical names:
133142

134143
.. code-block:: python
135144
:caption: Working with identifier aliases

0 commit comments

Comments
 (0)