-
Notifications
You must be signed in to change notification settings - Fork 3
Description
At the moment an element is identified by its repr method. It is not nice because in case of overloading it may fail. So an Element.get_id() -> str method is required.
pyaml/pyaml/lattice/element.py
Line 23 in 180c533
| # TODO: _repr_ is used for identifying element in various array. Use a get_id() method instead |
It is used:
- in the factory
pyaml/pyaml/configuration/factory.py
Line 143 in 180c533
| name = str(elt) |
- in ControlSystem:
pyaml/pyaml/control/controlsystem.py
Line 53 in 180c533
| self.add_magnet(str(m),m) |
pyaml/pyaml/control/controlsystem.py
Line 55 in 180c533
| self.add_magnet(str(e),e) |
pyaml/pyaml/control/controlsystem.py
Line 61 in 180c533
| self.add_magnet(str(m),m) |
- In Simulator:
pyaml/pyaml/control/controlsystem.py
Line 55 in 180c533
| self.add_magnet(str(e),e) |
pyaml/pyaml/lattice/simulator.py
Line 62 in 180c533
| self.add_magnet(str(e),e) |
pyaml/pyaml/lattice/simulator.py
Line 68 in 180c533
| self.add_magnet(str(m),m) |