Q:

Why can't I get the expect output 'BBB'?

# -*- coding: utf-8 -*-
class tA():
    def __init__(self):
        print 'AAA'

    def __del__(self):
        print 'BBB'

class tC(tA):
    def __init__(self, a, b=0):
        tA.__init__(self)
        self.b=b             # 1. del this ok

class tD(tC):
    def __init__(self):
        a=1
        #tC.__init__(self, a)             # 2. use this ok
        tC.__init__(self, a, self.func)   # 3. use this not ok
        #tC.__init__(self, a, 3)          # 4. use this ok

    def func(self, pos):
        pass
if __name__ == '__main__':
    tD()

why there is no  'BBB' output?
if I del zhe #1 , the output is ok
if I use #2 or #4, the output is ok
if I use #3, the output has no  'BBB'? 

A:

Because your 'BBB' is printed with the finalizer of your class (__del__ function). And finalizers are run when the garbage collector collects your object.
Python uses a double strategy for garbage collection: reference counting and cycle detection. Objects whose reference count reaches 0 are collected immediately, but if they participate in a cycle, then their count will never reach 0. Then the GC cycle detection routine, that is called periodically, will eventually detect it and release all the dangling objects.
In your particular code, case #3 creates a reference cycle: self.b is a reference to self.func. But the GC cycle detection is never run because the program ends before it has any chance.
But even if the GC is run, objects with finalizers have special rules. From the documentation:

Objects that have __del__() methods and are part of a reference cycle cause the entire reference cycle to be uncollectable, including objects not necessarily in the cycle but reachable only from it. Python doesn’t collect such cycles automatically because, in general, it isn’t possible for Python to guess a safe order in which to run the __del__() methods.

Also, from here

Changed in version 3.4: Following PEP 442, objects with a __del__() method don’t end up in gc.garbage anymore.

So, it looks like, in Python before 3.4, in classes with finalizers, you have to break the  cycles manually:

If you know a safe order, you can force the issue by examining the garbage list, and explicitly breaking cycles due to your objects within the list. Note that these objects are kept alive even so by virtue of being in the garbage list, so they should be removed from garbage too. For example, after breaking cycles, do del gc.garbage[:] to empty the list.

