On Wed, 18 Jan 2012 09:52:55 + (GMT)
Wilfried Falk w_h_f...@yahoo.de wrote:
Hello Pythons,
attached to this email is a pdf-file which shows, that += does not
work well all along. Mybe somebody of you is able to explain my
observations in this respect. I will be glad about an answer.
Hello Pythons,
attached to this email is a pdf-file which shows, that += does not work well
all along. Mybe somebody of you is able to explain my observations in this
respect. I will be glad about an answer.
Best regards
Wilfried
BugInPython.pdf
Description: Adobe PDF document
--
On 18 January 2012 09:52, Wilfried Falk w_h_f...@yahoo.de wrote:
Hello Pythons,
attached to this email is a pdf-file which shows, that += does not work
well all along. Mybe somebody of you is able to explain my observations in
this respect. I will be glad about an answer.
I think you are
def conc1(a, _list = []):
_list = _list + [a]
return _list
for i in range(4):
_list = conc1(i) ## - list not passed
You don't pass the list to the conc1 function, so you start with the
default, an empty list, each time.
--
On Wed, Jan 18, 2012 at 4:52 AM, Wilfried Falk w_h_f...@yahoo.de wrote:
Hello Pythons,
attached to this email is a pdf-file which shows, that += does not work
well all along. Mybe somebody of you is able to explain my observations in
this respect. I will be glad about an answer.
Best