Bruce Pearson wrote:
The first call to test has the file_list empty but on the second call to
test the file_list is no longer empty but contains the values appended
in the first call.
Is this correct behavior? I'm using python 2.5
yes:
http://docs.python.org/ref/function
The first call to test has the file_list empty but on the second call to test
the file_list is no longer empty but contains the values appended in the first
call.
Is this correct behavior? I'm using python 2.5
def test(param_1, file_list = []):
if len(file_list) == 0:
[EMAIL PROTECTED] wrote:
> On Apr 26, 8:34 pm, asker <[EMAIL PROTECTED]> wrote:
>> But:>>> print "%15.2f" % a+b
>>
>> Traceback (most recent call last):
>> File "", line 1, in
>> TypeError: cannot concatenate 'str' and 'float' objects
>>
>> Is this correct for Python to issue this error?
>
> Th
On Apr 26, 8:34 pm, asker <[EMAIL PROTECTED]> wrote:
> Hello:
> I have next Python 2.5.1 instructions:
>
> >>> a=12.34
> >>> b=11.23
> >>> print a+b
>
> 23.57
>
> >>> print "%15.2f" % (a+b)
>
> 23.57
>
> But:>>> print "%15.2f" % a+b
>
> Traceback (most recent call last):
> File "", line
Hello:
I have next Python 2.5.1 instructions:
>>> a=12.34
>>> b=11.23
>>> print a+b
23.57
>>> print "%15.2f" % (a+b)
23.57
But:
>>> print "%15.2f" % a+b
Traceback (most recent call last):
File "", line 1, in
TypeError: cannot concatenate 'str' and 'float' objects
Is this correct fo