import gc class Foo(object): x = 'foo' print(Foo().x) gc.get_referents(Foo.__dict__)[0]['x'] = 'bar' print(Foo().x)
Standard input is empty
foo foo
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!