Py Obj C - Classes

Classes

Objective-C classes are subclassed in the same manner as a normal Python class:

class MyDuck(NSObject): # NSObject is a base Objective-C class. def init(self): self = super(MyDuck, self).init # An Objective-C idiom, wherein the # subclass instance, self, is instantiated # by sending the superclass its # designated initializer. return self myLittleDuckOne = MyDuck.alloc.init

Read more about this topic:  Py Obj C

Famous quotes containing the word classes:

    There were three classes of inhabitants who either frequent or inhabit the country which we had now entered: first, the loggers, who, for a part of the year, the winter and spring, are far the most numerous, but in the summer, except for a few explorers for timber, completely desert it; second, the few settlers I have named, the only permanent inhabitants, who live on the verge of it, and help raise supplies for the former; third, the hunters, mostly Indians, who range over it in their season.
    Henry David Thoreau (1817–1862)

    Is a man too strong and fierce for society, and by temper and position a bad citizen,—a morose ruffian, with a dash of the pirate in him;Mnature sends him a troop of pretty sons and daughters, who are getting along in the dame’s classes at the village school, and love and fear for them smooths his grim scowl to courtesy. Thus she contrives to intenerate the granite and the feldspar, takes the boar out and puts the lamb in, and keeps her balance true.
    Ralph Waldo Emerson (1803–1882)

    By his very success in inventing labor-saving devices, modern man has manufactured an abyss of boredom that only the privileged classes in earlier civilizations have ever fathomed.
    Lewis Mumford (1895–1990)