This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author imiers1
Recipients georg.brandl, imiers1
Date 2009-05-30.06:37:15
SpamBayes Score 2.8113115e-08
Marked as misclassified No
Message-id <1243665441.27.0.193785694569.issue6148@psf.upfronthosting.co.za>
In-reply-to
Content
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 database entry. 

This is both a bug in that it does this and in that
its undocumented 

To see this download the attached file and then : 
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bug
>>> help(bug)

at this point the file bug now has been written to disk. 
This is a problem

I've got to think there is a reason for this, but seeing as I cant 
come up with it , better safe than sorry.
History
Date User Action Args
2009-05-30 06:37:23imiers1setrecipients: + imiers1, georg.brandl
2009-05-30 06:37:21imiers1setmessageid: <1243665441.27.0.193785694569.issue6148@psf.upfronthosting.co.za>
2009-05-30 06:37:18imiers1linkissue6148 messages
2009-05-30 06:37:16imiers1create