Ok, I applied that change to the version I'm using (0.3.8).  That
fixed it.

But I think I stumbled on another bug/inconcistancy.

If I tried to str/repr obj.attr it failed.

I looked around the code and this fix seemed to work, but I'm not sure
if it fits in with how the class is intended to function.

In /sqlalchemy/ext/associationproxy.py

in class class _AssociationDict(object)

change

    def items(self):
        return [(k, self._get(self.col[k])) for k in self]

to

    def items(self):
        return [(k, self._get(self.col[k])) for k in self.keys()]

Does that make sense?  Or is the problem deeper in the code?  It seems
to go along with what you said earlier about how the iteration was
made to work like an instrumentedlist.

-Ron


On Jun 16, 3:07 pm, jason kirtland <[EMAIL PROTECTED]> wrote:
> Ron wrote:
> > Now I'm having trouble with updating values in AttributeDict:
>
> > so
>
> > obj.attrs['key'] = 'somevalue'   (works)
> > obj.attrs['key'] = 'newvalue'    (second one doesn't work)
>
> > I get this error:
>
> >   File "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.3.8-
> > py2.4.egg/sqlalchemy/orm/mapper.py", line 679, in init
> >     raise e
> > TypeError: <lambda>() takes exactly 2 arguments (3 given)
>
> > Any more ideas?
>
> > -Ron
>
> Fixed in 2739.  (a silly typo)
>
> -jek


--~--~---------~--~----~------------~-------~--~----~
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