zaley wrote:
> In my C++ program ,python is embeded . I import One module(py file)
> and execute some functions .Then I modify py files in order to modify
> func parameters when process is still running .I import the module and
> execute functions again.But I find the result is same as before
'im
HYRY wrote:
> Why the third print stement output "'comments': [(1, 2, 3)]", I think
> it should be [].
> I am using
> Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]
> on win32.
>
> # program
> class PicInfo:
> def __init__(self, intro="", tags="", comments=[]):
This is
"HYRY" <[EMAIL PROTECTED]> wrote:
> Why the third print stement output "'comments': [(1, 2, 3)]", I think
> it should be [].
default arguments are calculated once. for details, see the tutorial
http://docs.python.org/tut/node6.html#SECTION00671
and the FAQ:
http://pyfaq.in