find_name function
(Shortest import: from brian2.core.names import find_name)
- brian2.core.names.find_name(name, names=None)[source]
Determine a unique name. If the desired
name
is already taken, will try to use a derivedname_1
,name_2
, etc.- Parameters:
name : str
The desired name.
names : Iterable, optional
A set of names that are already taken. If not provided, will use the names of all Brian objects as stored in
Nameable
.- Returns:
unique_name : str
A name based on
name
orname
itself, unique with respect to the names innames
.