On Thu, Nov 13, 2014 at 1:53 PM, Skip Montanaro
<skip.montan...@gmail.com> wrote:
> On Thu, Nov 13, 2014 at 2:44 PM, Skip Montanaro
> <skip.montan...@gmail.com> wrote:
>> What's not documented is
>> the behavior of calling atexit.register() while atexit._run_exitfuncs
>> is running. That's an implementation detail, and though unlikely to
>> change, it might be worthwhile getting that behavior documented.
>
> http://bugs.python.org/issue22867

In fact it seems the behavior does differ between Python 2.7 and Python 3.4:

$ cat testatexit.py
import atexit

@atexit.register
def main():
  atexit.register(goodbye)

@atexit.register
def goodbye():
  print("Goodbye")
$ python2 testatexit.py
Goodbye
Goodbye
$ python3 testatexit.py
Goodbye
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to