请大神解释一下这个函数的解析过程
程序代码:
def flatten(nested): try: for sublist in nested: for element in flatten(sublist): yield element except TypeError: yield nested
def flatten(nested): try: for sublist in nested: print 'AAAAAA'+str(sublist) for element in flatten(sublist): print 'BBBBBB'+str(element) yield element except TypeError: print 'CCCCCC'+str(nested) yield nested