[issue6148] Help well execute code it is called on

2009-05-30 Thread Georg Brandl
Georg Brandl added the comment: Ezio is correct. The file is already created while importing bug, not due to the call to help(). -- resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue6148] Help well execute code it is called on

2009-05-29 Thread Ezio Melotti
Ezio Melotti 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/

[issue6148] Help well execute code it is called on

2009-05-29 Thread Ian Miers
New submission from Ian Miers : when calling help() from the python interpreter on a function whose default argument is provided by another function ( e.g. def foo(bar=baz() ) : ), help will call baz(). This can cause problems because baz() can alter statefull data like a file or databas