parameters: (self, trait=None, traits=None, default_value=Undefined,
                   **kwargs)
docstring: Create a dict trait type from a Python dict.
  
          The default value is created by doing ``dict(default_value)``,
          which creates a copy of the ``default_value``.
  
          Parameters
          ----------
  
          trait : TraitType [ optional ]
              The specified trait type to check and use to restrict contents of
              the Container. If unspecified, trait types are not checked.
  
          traits : Dictionary of trait types [ optional ]
              A Python dictionary containing the types that are valid for
              restricting the content of the Dict Container for certain keys.
  
          default_value : SequenceType [ optional ]
              The default value for the Dict.  Must be dict, tuple, or None, and
              will be cast to a dict if not None. If `trait` is specified, the
              `default_value` must conform to the constraints it specifies.
docstring_summary: Create a dict trait type from a Python dict.
docstring_tokens: Create a dict trait type from a Python dict .
function: def __init__(self, trait=None, traits=None, default_value=Undefined,
                   **kwargs):
          """Create a dict trait type from a Python dict.
  
          The default value is created by doing ``dict(default_value)``,
          which creates a copy of the ``default_value``.
  
          Parameters
          ----------
  
          trait : TraitType [ optional ]
              The specified trait type to check and use to restrict contents of
              the Container. If unspecified, trait types are not checked.
  
          traits : Dictionary of trait types [ optional ]
              A Python dictionary containing the types that are valid for
              restricting the content of the Dict Container for certain keys.
  
          default_value : SequenceType [ optional ]
              The default value for the Dict.  Must be dict, tuple, or None, and
              will be cast to a dict if not None. If `trait` is specified, the
              `default_value` must conform to the constraints it specifies.
          """
          # Handling positional arguments
          if default_value is Undefined and trait is not None:
              if not is_trait(trait):
                  default_value = trait
                  trait = None
  
          # Handling default value
          if default_value is Undefined:
              default_value = {}
          if default_value is None:
              args = None
          elif isinstance(default_value, dict):
              args = (default_value,)
          elif isinstance(default_value, SequenceTypes):
              args = (default_value,)
          else:
              raise TypeError('default value of Dict was %s' % default_value)
  
          # Case where a type of TraitType is provided rather than an instance
          if is_trait(trait):
              if isinstance(trait, type):
                  warn("Traits should be given as instances, not types (for example, `Int()`, not `Int`)"
                       " Passing types is deprecated in traitlets 4.1.",
                       DeprecationWarning, stacklevel=2)
              self._trait = trait() if isinstance(trait, type) else trait
          elif trait is not None:
              raise TypeError("`trait` must be a Trait or None, got %s" % repr_type(trait))
  
          self._traits = traits
  
          super(Dict, self).__init__(klass=dict, args=args, **kwargs)
function_tokens: def __init__ ( self , trait = None , traits = None , default_value = Undefined , * * kwargs ) : # Handling positional arguments if default_value is Undefined and trait is not None : if not is_trait ( trait ) : default_value = trait trait = None # Handling default value if default_value is Undefined : default_value = { } if default_value is None : args = None elif isinstance ( default_value , dict ) : args = ( default_value , ) elif isinstance ( default_value , SequenceTypes ) : args = ( default_value , ) else : raise TypeError ( 'default value of Dict was %s' % default_value ) # Case where a type of TraitType is provided rather than an instance if is_trait ( trait ) : if isinstance ( trait , type ) : warn ( "Traits should be given as instances, not types (for example, `Int()`, not `Int`)" " Passing types is deprecated in traitlets 4.1." , DeprecationWarning , stacklevel = 2 ) self . _trait = trait ( ) if isinstance ( trait , type ) else trait elif trait is not None : raise TypeError ( "`trait` must be a Trait or None, got %s" % repr_type ( trait ) ) self . _traits = traits super ( Dict , self ) . __init__ ( klass = dict , args = args , * * kwargs )