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 ezio.melotti
Recipients ezio.melotti, georg.brandl, imiers1
Date 2009-05-30.06:55:21
SpamBayes Score 6.0112718e-05
Marked as misclassified No
Message-id <1243666523.39.0.530214151659.issue6148@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-05-30 06:55:23ezio.melottisetrecipients: + ezio.melotti, georg.brandl, imiers1
2009-05-30 06:55:23ezio.melottisetmessageid: <1243666523.39.0.530214151659.issue6148@psf.upfronthosting.co.za>
2009-05-30 06:55:22ezio.melottilinkissue6148 messages
2009-05-30 06:55:21ezio.melotticreate