A couple of design patterns

by sweavo

The “Vader” design pattern

def addChild( self, c ):
    self._children.append( c )
    c.setParent( self )

And the “Luke”

def setParent( self, p )
    raise Noooooo()
Advertisements