pycocoa.nstypes.NSStr

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

# Class NSStr

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

Known Subclasses:
  - at

Python wrapper for the ObjC `NS[Constant]String`.

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

Static Methods
a new object with type S, a subtype of T |
__new__(cls, ustr) New NSStr wrapping `NS[Constant]String`. |

Properties
| value Get the original string value (`str`).
| str Get the original string value (`str`).
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, ustr) Static Method |
New NSStr wrapping `NS[Constant]String`. Parameters: `ustr` - The string value (`str` or `unicode`). Returns: a new object with type S, a subtype of T The string (NSStr). Raises: `RuntimeError` - An NSAutoreleasePool ObjC instance is created with `cached=False`. Overrides: object.__new__

### __hash__(self) (Hashing function) |
hash(x) Overrides: object.__hash__ (inherited documentation)

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

Property Details

### value Get the original string value (`str`). Get Method: value(self) - Get the original string value (`str`). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### str Get the original string value (`str`). Get Method: value(self) - Get the original string value (`str`). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.