pycocoa.nstypes.NSDecimal

Package pycocoa :: Module nstypes :: Class NSDecimal |
[frames] | no frames]

# Class NSDecimal

           object --+
                    |
    runtime._ObjCBase --+
                        |
     runtime.ObjCInstance --+
                            |
                           NSDecimal

Optimized, Python `NSDecimalNumber` class.

Instance Methods
__str__(self) str(x) |
Inherited from `runtime.ObjCInstance`: `__del__`, `__getattr__`, `retained`, `set_ivar` Inherited from `runtime._ObjCBase`: `__repr__` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Static Methods
a new object with type S, a subtype of T |
__new__(cls, py) New NSDecimal. |

Properties
| double Get this NSDecimal as a Python `float`.
| value Get this NSDecimal as a Python `Decimal`.
| Decimal Get this NSDecimal as a Python `Decimal`.
Inherited from `runtime.ObjCInstance`: `Type`, `from_py2NS`, `inPool`, `name`, `objc_class`, `objc_classname`, `objc_description`, `ptr` Inherited from `runtime._ObjCBase`: `description`, `typename` Inherited from `object`: `__class__`

Method Details

### __new__(cls, py) Static Method |
New NSDecimal. Parameters: `py` - The decimal value (`Decimal`, `float`, `int`, `str` or NSDecimal). Returns: a new object with type S, a subtype of T New NSDecimal (ObjCInstance). Raises: `RuntimeError` - An NSAutoreleasePool ObjC instance is created with `cached=False`. Overrides: object.__new__

### __str__(self) (Informal representation operator) |
str(x) Overrides: object.__str__ (inherited documentation)

Property Details

### double Get this NSDecimal as a Python `float`. Get Method: double(self) - Get this NSDecimal as a Python `float`. Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### value Get this NSDecimal as a Python `Decimal`. Get Method: value(self) - Get this NSDecimal as a Python `Decimal`. Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### Decimal Get this NSDecimal as a Python `Decimal`. Get Method: value(self) - Get this NSDecimal as a Python `Decimal`. Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.