DefaultValidator class

(Shortest import: from brian2.core.preferences import DefaultValidator)

class brian2.core.preferences.DefaultValidator(value)[source]

Bases: object

Default preference validator

Used by BrianPreference as the default validator if none is given. First checks if the provided value is of the same class as the default value, and then if the default is a Quantity, checks that the units match.



Call self as a function.



Call self as a function.