Ron wrote:
>
> Nevermind.  I see what I was doing.  In much of my code it worked
> fine, just like a dictionary.
>
> But in another part of my code I do:
>
> for i in self.attrs:
>    ...blah
>
> which works like a list.  I remember when I saw the __iter__
> implementation requirement noting that that may be confusing.

That's a side-effect of the way dict collections are managed by the 
InstrumentedList.  The iterator behavior will be over keys as you'd 
expect in 0.4, both on dict collection classes and in dict-based 
association proxies.

I think the 0.3 association proxy does that only to be consistent 
with the underlying attribute's iterator, but I don't see any 
strong reason to keep that behavior in 0.3, especially as 
association dict support is pretty much brand new.  Making the 
assoc proxy's iterator truly dict-like can go in 0.3.9 if there's 
call.

Cheers,
Jason


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to