class Foo(object):
    def __init__(self, message):
        self.message = message


class Bar(Foo):
    def __init__(self):
        self.ps = ' ttfn'

    def display_message(self):
        print('%s %s'%(self.message, self.ps))

if __name__ == '__main__':
    f = Foo("Hello World")
    f.__class__ = Bar
    f.display_message()

@@ -37,17 +37,8 @@
 self
-, message
 ):%0A 
@@ -48,275 +48,276 @@
     
-self.message = message%0A%0A%0Aclass Bar(Foo):%0A    def __init__(self):%0A        self.ps = ' ttfn'%0A%0A    def display_message(self):%0A        print('%25s %25s'%25(self.message, self.ps))%0A%0Aif __name__ == '__main__':%0A    f = Foo(%22Hello World%22)%0A    f.__class__ = Bar%0A    f.display_message(
+pass%0A%0A    def greet(self, person, adj, **opargs):%0A        print('Hello %25s, %25s' %25 (person, adj))%0A%0A    def greet(self, person, **opargs):%0A        print('Hello %25s' %25 person)%0A%0Aif __name__ == '__main__':%0A    f = Foo()%0A    f.greet('Double D')%0A    f.greet('Double D', 'asshole'
 )%0A

backup commit