Yes but I received:

>>> print foo.to_dict()
{}

:-(

I read the source code of to_dict() function but I didn't understand
why...


On Thu, 2009-09-03 at 08:39 -0300, Felipe Ronchi Brigido wrote:
> Hi!
> 
> Did you tried to use it in some instance of entity?
> 
> Ex:
> 
> >>> class Foo(Entity):
>     spam = Field(Unicode(10))
>     eggs = Field(Integer())
> 
> >>> foo = Foo(spam = u'spam', eggs = 10)
> 
> >>> foo.to_dict()
> {'spam': u'spam', 'eggs': 10}
> 
> >D
> 
> Felipe Ronchi Brigido
> 
> 2009/9/2 Stefano Fontanelli <[email protected]>:
> >
> >
> > Hi,
> > has anyone examples about the use of to_dict() function?
> >
> > I tried to use it but it returns '{}'.
> >
> > Thank you very much.
> >
> > Stefano.
> >
> > --
> > Ing. Stefano Fontanelli
> > PhD Student, Scuola Superiore Sant'Anna
> > ReTiS Lab c/o CEIIC
> > Via G. Moruzzi, 1
> > 56124 Pisa (Italy)
> > tel: +39 050 5492010, mobile: +39 333 3653294
> > skype: stefanofontanelli
> > homepage: http://retis.sssup.it/~stefano/
> >
> >
> > >
> >
> 
> > 
-- 
Ing. Stefano Fontanelli
PhD Student, Scuola Superiore Sant'Anna
ReTiS Lab c/o CEIIC
Via G. Moruzzi, 1
56124 Pisa (Italy)
tel: +39 050 5492010, mobile: +39 333 3653294
skype: stefanofontanelli
homepage: http://retis.sssup.it/~stefano/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to