timid/environment.py
def _declare_special(self, name, sep, klass):
        """
        Declare an environment variable as a special variable.  This can
        be used even if the environment variable is not present.

        :param name: The name of the environment variable that should
                     be considered special.
        :param sep: The separator to be used.
        :param klass: The subclass of ``SpecialVariable`` used to
                      represent the variable.
        """

        # First, has it already been declared?
        if name in self._special:
            special = self._special[name]
            if not isinstance(special, klass) or sep != special._sep:
                raise ValueError('variable %s already declared as %s '
                                 'with separator "%s"' %
                                 (name, special.__class__.__name__,
                                  special._sep))

        # OK, it's new; declare it
        else:
            self._special[name] = klass(self, name, sep)
def _declare_special(self, name, sep, klass):
        # First, has it already been declared?
        if name in self._special:
            special = self._special[name]
            if not isinstance(special, klass) or sep != special._sep:
                raise ValueError('variable %s already declared as %s '
                                 'with separator "%s"' %
                                 (name, special.__class__.__name__,
                                  special._sep))

        # OK, it's new; declare it
        else:
            self._special[name] = klass(self, name, sep)
def _declare_special ( self , name , sep , klass ) : # First, has it already been declared? if name in self . _special : special = self . _special [ name ] if not isinstance ( special , klass ) or sep != special . _sep : raise ValueError ( 'variable %s already declared as %s ' 'with separator "%s"' % ( name , special . __class__ . __name__ , special . _sep ) ) # OK, it's new; declare it else : self . _special [ name ] = klass ( self , name , sep )
Declare an environment variable as a special variable.  This can
        be used even if the environment variable is not present.

        :param name: The name of the environment variable that should
                     be considered special.
        :param sep: The separator to be used.
        :param klass: The subclass of ``SpecialVariable`` used to
                      represent the variable.
Declare an environment variable as a special variable . This can be used even if the environment variable is not present .