Skip to content

Commit

Permalink
Fix wrong preference example in documentation
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
denisalevi authored Jul 6, 2021
1 parent d97ff3a commit 0b76afa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs_sphinx/advanced/preferences.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ Preferences

Brian has a system of global preferences that affect how certain objects
behave. These can be set either in scripts by using the `prefs` object
or in a file. Each preference looks like ``codegen.c.compiler``, i.e. dotted
or in a file. Each preference looks like ``codegen.cpp.compiler``, i.e. dotted
names.

Accessing and setting preferences
---------------------------------
Preferences can be accessed and set either keyword-based or attribute-based.
The following are equivalent::

prefs['codegen.c.compiler'] = 'gcc'
prefs.codegen.c.compiler = 'gcc'
prefs['codegen.cpp.compiler'] = 'gcc'
prefs.codegen.cpp.compiler = 'gcc'

Using the attribute-based form can be particulary useful for interactive
work, e.g. in ipython, as it offers autocompletion and documentation.
Expand Down

0 comments on commit 0b76afa

Please sign in to comment.