Tried to replace this with this,  but results are the same

 

temp1 = p.children[1]

temp2 = p.children[2]

 

p.children[2] = temp1

p.children[1] = temp2

 

From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On
Behalf Of Michael Bayer
Sent: Tuesday, January 08, 2013 2:23 AM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Strange behaviour while trying to swap related
records, or am I doing it wrong?

 

 

On Jan 7, 2013, at 7:05 PM, Alexey Vihorev wrote:

 

p.children[1], p.children[2] = p.children[2], p.children[1]

print(p.children) #prints [Mary, Kenny, John]

 

 

yeah, without looking too deeply I'm fairly certain this is this trac
ticket:

 

http://www.sqlalchemy.org/trac/ticket/1103

 

 

basically would add a good chunk of complexity and overhead to the list
instrumentation.   this is a "blue sky" ticket for that reason.   For now
you'd need to just assign to an intermediary variable and do one assignment
at a time.

 

 

 

-- 
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to