Message88565
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. |
|
Date |
User |
Action |
Args |
2009-05-30 06:37:23 | imiers1 | set | recipients:
+ imiers1, georg.brandl |
2009-05-30 06:37:21 | imiers1 | set | messageid: <1243665441.27.0.193785694569.issue6148@psf.upfronthosting.co.za> |
2009-05-30 06:37:18 | imiers1 | link | issue6148 messages |
2009-05-30 06:37:16 | imiers1 | create | |
|