Re: python variable assignement

2007-09-24 Thread Duncan Booth
mihai <[EMAIL PROTECTED]> wrote: > > This is the code: > > begin = select_point() > if begin == None: > return > > end = select_point() > while end != None: > record = Record(begin, end) > id = add(record) > begin = end > end = select_point() > #

Re: python variable assignement

2007-09-24 Thread Carsten Haese
On Mon, 2007-09-24 at 12:12 +, mihai wrote: > [...] > id = add(record) > [...] Not that this causes your problem, but I'd still like to point out that 'id' is the name of a built-in function. Shadowing built-in names can lead to surprising behavior. > Is there a way to see if the name

Re: python variable assignement

2007-09-24 Thread mihai
This is the code: begin = select_point() if begin == None: return end = select_point() while end != None: record = Record(begin, end) id = add(record) begin = end end = select_point() # here (sometimes) begin has the same value (or points to the sa

Re: python variable assignement

2007-09-24 Thread Carsten Haese
On Mon, 2007-09-24 at 10:13 +, mihai wrote: > I work at an application witch has embeded python. > > We have an python type X. > > # a != b > > a = b # at this point both variables have the same value Not quite. At this point, 'a' and 'b' are names in the local namespace that refer to the s

python variable assignement

2007-09-24 Thread mihai
I work at an application witch has embeded python. We have an python type X. # a != b a = b # at this point both variables have the same value b = select_other() # steel the same values but both have the new value of b What might be the cause for this behavior? The type of a and b variable i