Esempio n. 1
0
 def _immutable(inst, value):
     '''Throws an C{AttributeError}, always.
     '''
     from pygeodesy.named import classname
     s = _DOT_(repr(inst), self.name)
     s = _EQUALSPACED_(s, repr(value))
     t = _SPACE_(_immutable_, classname(self))
     raise _AttributeError(s, txt=t)
Esempio n. 2
0
    def toStr(self):  # PYCHOK expected
        '''Return this reference frame as a text string.

           @return: This L{RefFrame}'s attributes (C{str}).
        '''
        e = self.ellipsoid
        t = ('name=%r'               % (self.name,),
             'epoch=%s'              % (fStrzs('%.3f' % (self.epoch,)),),
             'ellipsoid=%s(name=%r)' % (classname(e), e.name))
        return ', '.join(t)
Esempio n. 3
0
    def toStr(self):  # PYCHOK expected
        '''Return this reference frame as a text string.

           @return: This L{RefFrame}'s attributes (C{str}).
        '''
        e = self.ellipsoid
        t = ('%s=%r'        % (_name_, self.name),
             '%s=%s'        % (_epoch_, fstrzs('%.3F' % (self.epoch,))),
             '%s=%s(%s=%r)' % (_ellipsoid_, classname(e), _name_, e.name))
        return _COMMA_SPACE_.join(t)
Esempio n. 4
0
def instr(inst, *args, **kwds):
    '''Return the string representation of an instantiation.

       @arg inst: The instance (any C{type}).
       @arg args: Optional positional arguments.
       @kwarg kwds: Optional keyword arguments.

       @return: Representation (C{str}).
    '''
    from pygeodesy.named import classname
    return unstr(classname(inst), *args, **kwds)
Esempio n. 5
0
    def toStr(self, **unused):  # PYCHOK expected
        '''Return this reference frame as a text string.

           @return: This L{RefFrame}'s attributes (C{str}).
        '''
        e = self.ellipsoid
        t = (Fmt.EQUAL(_name_,
                       repr(self.name)), Fmt.EQUAL(_epoch_, self.epoch),
             Fmt.PAREN(Fmt.EQUAL(_ellipsoid_, classname(e)),
                       Fmt.EQUAL(_name_, repr(e.name))))
        return _COMMASPACE_.join(t)
Esempio n. 6
0
 def __str__(self):
     from pygeodesy.named import classname
     return Fmt.PAREN(classname(self, prefixed=True), NN)
Esempio n. 7
0
 def __str__(self):
     from pygeodesy.named import classname
     return _item_ps(classname(self, prefixed=True), NN)
Esempio n. 8
0
 def __str__(self):
     from pygeodesy.named import classname
     return '%s()' % (classname(self, prefixed=True), )