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

# Class _NamedUnit

      object --+
               |
    named._Named --+
                   |
                  _NamedUnit

Known Subclasses:
  - Float
  - , Str
  - , Int
  - , units.Bool

(INTERNAL) Base class for `units`.

Instance Methods
Inherited from `named._Named`: `__format__`, `__imatmul__`, `__matmul__`, `__repr__`, `__rmatmul__`, `__str__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `renamed`, `toRepr`, `toStr`, `toStr2` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Static Methods
a new object with type S, a subtype of T |
__new__(cls, typ, arg, name, Error=<class 'pygeodesy.errors.UnitError'>, **name_arg) (INTERNAL) Return a named `typ.__new__(cls, arg)` instance. |

Properties
| std_repr Class `property` with a `.name` attribute.
| units Class `property` with a `.name` attribute.
Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof` Inherited from `object`: `__class__`

Method Details

### __new__ (cls, typ, arg, name, Error=<class 'pygeodesy.errors.UnitError'>, **name_arg) Static Method |
(INTERNAL) Return a named `typ.__new__(cls, arg)` instance. Returns: a new object with type S, a subtype of T Overrides: object.__new__

Property Details

### std_repr Class `property` with a `.name` attribute. Get method: std_repr(self) - Get the representation (`bool`, `True` means standard). Set method: std_repr(self, std) - Set the representation (`True` or `"std"` for standard).

### units Class `property` with a `.name` attribute. Get method: units(self) - Get the units name (`str`). Set method: units(self, units) - Set the units name for this instance (`str` or `None` for default).