@@ -1411,7 +1411,7 @@ class UninitializedMixin(object):
14111411 attempt to access the ``_data`` will trigger the initialization of the
14121412 Config object from its ``_default`` value. Setting the ``_data``
14131413 attribute will also trigger resolution of the Config object, but
1414- without processing the ``_default__ ``.
1414+ without processing the ``_default ``.
14151415
14161416 """
14171417
@@ -1449,7 +1449,7 @@ def _data(self, value):
14491449 # recursively lookup the _data attribute and the second lookup
14501450 # will resolve to normal attribute assignment).
14511451 #
1452- # We first encountered this issue for Config objects stores as
1452+ # We first encountered this issue for Config objects stored as
14531453 # class attributes (i.e., the default Config for something like
14541454 # a solver or writer) and multiple threads were simultaneously
14551455 # creating instances of the class (each of which was resolving
@@ -1628,7 +1628,12 @@ def set_default_value(self, default):
16281628
16291629 def set_domain (self , domain ):
16301630 self ._domain = domain
1631- self .set_value (self .value (accessValue = False ))
1631+ # Note that the domain is generally a callable (type, function,
1632+ # or functor). However, ConfigDict can also have a str domain
1633+ # (because ConfigDict doesn't need/use an actual domain for
1634+ # validation, we re-use that slot to *document* the domain).
1635+ if domain .__class__ is not str :
1636+ self .set_value (self .value (accessValue = False ))
16321637
16331638 def _cast (self , value ):
16341639 if value is None :
0 commit comments