Welcome To Snipplr


Everyone's Recent Python Snippets Tagged class



« Prev 1 Next »
This simple example will show you how to inherit a class from a parent class. I have to apologise for some grammar mistakes that I've probably put in the comments, but English is not my native language. If you execute this code, the output will be...
2 964 posted 13 years ago by Cesco
0 474 posted 14 years ago by magicrebirth
This bit of code allows you to turn code that looks like this: x = {'foo':1, 'bar':2 } x['foo'] = 3 Into this: x = dictclass( {'foo':1, 'bar':2 } ) x.foo = 3
2 636 posted 15 years ago by kangell
« Prev 1 Next »