On Mon, Jan 07, 2008 at 03:41:22PM -0200, Marcos Dione wrote:
> On Mon, Jan 07, 2008 at 01:00:20AM -0200, Marcos Dione wrote:
> > class SQLAObject (object):
> >     def __init__ (self, **kwargs):
> >         object.__init__ (self)
> >         self.__dict__.update (kwargs)
> 
>     I got this in IRC:
> 
> 01:33 < zzzeek_> styxman: updating __dict__ directly is a no no
> 01:33 < zzzeek_> have to use setattr()
> 
>     maybe is that? I'll check later.

    yes, it was. I changed the code to this and it started working
again:

class SQLAObject (object):
    def __init__ (self, **kwargs):
        object.__init__ (self)
        for (k, v) in kwargs.items ():
            setattr (self, k, v)

-- 
(Not so) Random fortune:
23:19 < perrito666> yogurt2ungue: justo estoy viendo una pelicula que
    demuestra en que se ha convertido #grulic
23:19 < perrito666> alguna vez viste equilibrium?

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