check_preference_name function
(Shortest import: from brian2.core.preferences import check_preference_name)
- brian2.core.preferences.check_preference_name(name)[source]
Make sure that a preference name is valid. This currently checks that the name does not contain illegal characters and does not clash with method names such as “keys” or “items”.
- Parameters:
name : str
The name to check.
Raises
PreferenceError
In case the name is invalid.