@@ -11,9 +11,7 @@ Changing the Predefined Variables
1111+++++++++++++++++++++++++++++++++
1212
1313There are a few ways to adjust the parser configuration depending on your
14- needs. The config is available in two places that may or may not represent
15- the same :py:class: `~nameparser.config.Constants ` instance depending on
16- how you instantiate the :py:class: `~nameparser.parser.HumanName ` class.
14+ needs. The config is available in two places.
1715
1816The first is via ``from nameparser.config import CONSTANTS ``.
1917
@@ -33,6 +31,10 @@ The other is the ``C`` attribute of a ``HumanName`` instance, e.g.
3331 >>> hn.C
3432 <Constants() instance>
3533
34+ This is usually a reference to the module's shared
35+ :py:class: `~nameparser.config.Constants ` instance, depending on how you
36+ instantiate the :py:class: `~nameparser.parser.HumanName ` class.
37+
3638Take a look at the :py:mod: `nameparser.config ` documentation to see what's
3739in the constants. Here's a quick walk through of some examples where you
3840might want to adjust them.
@@ -149,7 +151,7 @@ reference to the module-level config values with the behavior described above.
149151 False
150152 >>> instance.C.titles.add(' dean' )
151153 SetManager(set([u'msgt', ..., u'adjutant']))
152- >>> other_instance = HumanName(" Dean Robert Johns" , None )
154+ >>> other_instance = HumanName(" Dean Robert Johns" , None ) # <-- pass None for per-instance config
153155 >>> other_instance
154156 <HumanName : [
155157 title: ''
@@ -163,8 +165,8 @@ reference to the module-level config values with the behavior described above.
163165 True
164166
165167
166- Refreshing the Parse
167- ++++++++++++++++++++
168+ Config Changes May Need Parse Refresh
169+ +++++++++++++++++++++++++++++++++++++
168170
169171The full name is parsed upon assignment to the ``full_name `` attribute or
170172instantiation. Sometimes after making changes to configuration or other inner
0 commit comments