Code: Alles auswählen
In [1]: class Foo(object):
...: def __init__(self, foo='bar', ham='spam'):
...: self.foo = foo
...: self.ham = ham
...:
...:
In [2]: class Bar(Foo):
...: def __init__(self, baz=True, **kwargs):
...: Foo.__init__(self, **kwargs)
...: self.baz = baz
...:
...:
In [3]: Bar?
Type: type
Base Class: <type 'type'>
String Form: <class '__main__.Bar'>
Namespace: Interactive
File: /usr/lib/pymodules/python2.6/IPython/FakeModule.py
Docstring:
<no docstring>
Constructor information:
Definition: Bar(self, baz=True, **kwargs)