set_magnet_by_id (method)

set_magnet_by_id(self, index, magnet)[source]

Set the magnet at the corresponding index Raise error if the hole doesn’t have a magnet for the corresponding index

Parameters
  • self (Hole) – A Hole object

  • index (int) – Index of the magnet to return

  • magnet (Magnet) – Magnet object to set (or None)