(cls)
| 535 | |
| 536 | @classmethod |
| 537 | def _select_for_exit(cls): |
| 538 | # Return live finalizers marked for exit, oldest first |
| 539 | L = [(f,i) for (f,i) in cls._registry.items() if i.atexit] |
| 540 | L.sort(key=lambda item:item[1].index) |
| 541 | return [f for (f,i) in L] |
| 542 | |
| 543 | @classmethod |
| 544 | def _exitfunc(cls): |