changeset 10:43274f34692f

created
author 127.0.0.1
date Thu, 07 Oct 2010 23:35:37 +0200
parents c885db77f153
children 523560118471
files docs/super
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/docs/super	Thu Oct 07 23:35:02 2010 +0200
+++ b/docs/super	Thu Oct 07 23:35:37 2010 +0200
@@ -1,28 +1,23 @@
 {{{#!python
 >>> class Base(object):
 ...     def __init__(self, *args, **kwargs):
-...         self.foo = 1
 ...         print 'base'
 ...
 >>> class A(Base):
 ...     def __init__(self, *args, **kwargs):
 ...         super(A, self).__init__(*args, **kwargs)
-...         self.bar = 2
 ...         print 'A'
 ...
 >>> class B(Base):
 ...     def __init__(self, *args, **kwargs):
 ...         super(B, self).__init__(*args, **kwargs)
-...         self.baz = 3
 ...         print 'B'
 ...
 >>> class C(A, B):
 ...     pass
 ...
->>> dir(C())
+>>> c = C()
 base
 B
 A
-['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'bar', 'baz', 'foo']
-
 }}}
\ No newline at end of file