Ezio Melotti <ezio.melo...@gmail.com> added the comment:

Default args are evaluated when the module is imported, if the arg is a
function call, the function is called.
You can see how the file is created just after the import, you don't
even need to call help().

This behavior is documented here:
http://docs.python.org/tutorial/controlflow.html#default-argument-values

The doc doesn't mention explicitly function calls, that could be added.

----------
components:  -Interpreter Core
nosy: +ezio.melotti
versions:  -Python 2.5, Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6148>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to