[issue22867] document behavior of calling atexit.register() while atexit._run_exitfuncs is running

2015-07-21 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy:  -ethan.furman

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22867] document behavior of calling atexit.register() while atexit._run_exitfuncs is running

2014-11-18 Thread Ethan Furman

Ethan Furman added the comment:

From a post by Ian Kelly 
(https://mail.python.org/pipermail/python-list/2014-November/681073.html)
--
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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22867] document behavior of calling atexit.register() while atexit._run_exitfuncs is running

2014-11-14 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22867] document behavior of calling atexit.register() while atexit._run_exitfuncs is running

2014-11-13 Thread Skip Montanaro

New submission from Skip Montanaro:

A discussion on comp.lang.python about prettying up the if __name__ == 
'main__' idiom led to a suggestion that a decorator could simple register the 
main function using atexit.register. That looks like it will work, but leaves 
open the possibility that while main() is running via atexit._run_exitfuncs, 
other exit functions might be registered.

As currently defined (at least in the Python version with 2.7), I think 
everything will work fine. Still, the behavior of adding new exit functions 
during exit is not defined. Would be kind of nice if this behavior was blessed, 
and then mentioned in the documentation.

--
assignee: docs@python
components: Documentation
messages: 231135
nosy: docs@python, skip.montanaro
priority: low
severity: normal
status: open
title: document behavior of calling atexit.register() while 
atexit._run_exitfuncs is running

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22867] document behavior of calling atexit.register() while atexit._run_exitfuncs is running

2014-11-13 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com