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 134 posted 10 years ago by Cesco
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 71 posted 12 years ago by kangell
« Prev 1 Next »