Welcome To Snipplr
Everyone's Recent Python Snippets Tagged class
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« 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
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 »