def __get__(self, obj, cls=None):
if obj is None:<EOL><INDENT>return self<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>value = obj._trait_values[self.name]<EOL><DEDENT>except KeyError:<EOL><INDENT>if self.name in obj._trait_dyn_inits:<EOL><INDENT>value = obj._trait_dyn_inits[self.name](obj)<EOL>value = self._validate(obj, value)<EOL>obj._trait_values[self.name] = value<EOL>return value<EOL><DEDENT>else:<EOL><INDENT>raise TraitError('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT>except Exception:<EOL><INDENT>raise TraitError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>return value<EOL><DEDENT><DEDENT>
Get the value of the trait by self.name for the instance.

        Default values are instantiated when :meth:`HasTraits.__new__`
        is called.  Thus by the time this method gets called either the
        default value or a user defined value (they called :meth:`__set__`)
        is in the :class:`HasTraits` instance.