> I updated again and rebuilt. > > >>> def sum(*args): > ... s = 0 > ... for x in args: s = s + x > ... return s > ... > >>> sum(2,3,4) > 9 > >>> sum(*[2,3,4]) > 9 > >>> x = (2,3,4) > >>> sum(*x) > 9 > >>> def func(a, b, c): > ... print a, b, c > ... > >>> func(**{'a':2, 'b':1, 'c':6}) > 2 1 6 > >>> func(**{'c':8, 'a':1, 'b':9}) > 1 9 8 > >>> > > *cool*. But most importantly, IMO: class SubClass(Class): def __init__(self, a, *args, **kw): self.a = a Class.__init__(self, *args, **kw) Much neater.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4