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:

    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)

    There are three classes into which all the women past seventy that ever I knew were to be divided: 1. That dear old soul; 2. That old woman; 3. That old witch.
    Samuel Taylor Coleridge (1772–1834)

    Intellectuals can tell themselves anything, sell themselves any bill of goods, which is why they were so often patsies for the ruling classes in nineteenth-century France and England, or twentieth-century Russia and America.
    Lillian Hellman (1907–1984)