On Jun 2, 2011, at 10:29 AM, Massimo Di Pierro wrote: > > The point is that it allows you to do > > data.a.b.c=1 > > without having to do > > data.a=Storage() > data.a.b=Storage() > data.a.b.c=1 > > In your test: >>>> data.test > <Storage {}> > > but: >>>> data.test == None > True >>>> if not data.test: print 'null' > null
I'd vote for None, and explicit initialization. > > > On Jun 2, 11:54 am, Ross Peoples <ross.peop...@gmail.com> wrote: >> I just tried this in a web2py shell: >> >>>>> from gluon.storage import Storage >>>>> data = Storage() >>>>> data.foo = 'bar' >>>>> data.foo >> 'bar' >>>>> data.test >> >> <Storage {}>