我不清楚在while循环中捕获GeneratorExit的行为,这是我的代码:#pythonPython2.6.6(r266:84292,Sep42013,07:46:00)[GCC4.4.720120313(RedHat4.4.7-3)]onlinux2Type"help","copyright","credits"or"license"formoreinformation.>>>deffunc():...whileTrue:...try:...yield9...exceptGeneratorExit:...print"Needtodosomecleanup."...>>>g=fun