Package pygeodesy :: Module unitsBase :: Class Str
[frames] | no frames]

Class Str

  object --+        
           |        
  basestring --+    
               |    
             str --+
                   |
  object --+       |
           |       |
named._Named --+   |
               |   |
      _NamedUnit --+
                   |
                  Str
Known Subclasses:

Named, callable str.

Instance Methods
 
__call__(self, *args, **name_Error)
Join all positional args like self.join(args).
 
__repr__(self)
Return a representation of this Str.
 
__str__(self)
Return this Str as standard str.
 
join_(self, *args, **name_Error)
Join all positional args like self.join(args).
 
toRepr(self, std=False, **unused)
Return a representation of this Str.
 
toStr(self, **unused)
Return this Str as standard str.

Inherited from str: __add__, __contains__, __eq__, __format__, __ge__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __rmod__, __rmul__, __sizeof__, capitalize, center, count, decode, encode, endswith, expandtabs, find, format, index, isalnum, isalpha, isdigit, islower, isspace, istitle, isupper, join, ljust, lower, lstrip, partition, replace, rfind, rindex, rjust, rpartition, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Inherited from named._Named: __imatmul__, __matmul__, __rmatmul__, attrs, classof, copy, dup, methodname, rename, toStr2

Inherited from object: __delattr__, __init__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Static Methods
a new object with type S, a subtype of T
__new__(cls, arg=None, name='', Error=<class 'pygeodesy.errors.UnitError'>, **name_arg)
New Str instance.
Properties

Inherited from _NamedUnit: std_repr, units

Inherited from named._Named: classname, classnaming, iteration, name, named, named2, named3, named4, sizeof

Inherited from object: __class__

Method Details

__call__ (self, *args, **name_Error)
(Call operator)

 

Join all positional args like self.join(args).

Returns:
All args joined by this instance (Str_).

Note: An other Str instance is returned to make the result re-callable.

__new__ (cls, arg=None, name='', Error=<class 'pygeodesy.errors.UnitError'>, **name_arg)
Static Method

 

New Str instance.

Arguments:
  • cls - This class (Str or sub-class).
  • arg - The value (any type convertable to str).
  • name - Optional instance name (str).
  • Error - Optional error to raise, overriding the default (ValueError).
  • name_arg - Optional name=arg keyword argument, inlieu of name and arg.
Returns: a new object with type S, a subtype of T
A Str instance.
Raises:
  • Error - Invalid arg.
Overrides: object.__new__

See Also: Callable, not-nameable class pygeodesy.Str_.

__repr__ (self)
(Representation operator)

 

Return a representation of this Str.

Overrides: object.__repr__

See Also: Method Str.toRepr and property Str.std_repr.

Note: Use env variable PYGEODESY_STR_STD_REPR=std prior to import pygeodesy to get the standard repr or set property std_repr=False to always get the named toRepr representation.

__str__ (self)
(Informal representation operator)

 

Return this Str as standard str.

Overrides: object.__str__

join_ (self, *args, **name_Error)

 

Join all positional args like self.join(args).

Returns:
All args joined by this instance (Str_).

Note: An other Str instance is returned to make the result re-callable.

toRepr (self, std=False, **unused)

 

Return a representation of this Str.

Arguments:
  • std - If True return the standard repr, otherwise the named representation (bool).
Overrides: named._Named.toRepr

See Also: Method Str.__repr__ for more documentation.

toStr (self, **unused)

 

Return this Str as standard str.

Overrides: named._Named.toStr