To clarify, this branch implements laziness as described in the TODO. Rob mentioned that it would be nice to sometimes override that behavior per query. That (overriding per query) is not implemented here. So the syntax closely mirrors the TODO.
A single, lazy attr:
class C(object):
...
attr = Unicode(lazy=True)
or a group of lazy attrs (loaded together if either is accessed):
class C(object):
...
attr = Unicode(lazy=2)
attr2 = Unicode(lazy=2)
Gustavo,
I'm excited for your review.
To clarify, this branch implements laziness as described in the TODO. Rob mentioned that it would be nice to sometimes override that behavior per query. That (overriding per query) is not implemented here. So the syntax closely mirrors the TODO.
A single, lazy attr:
class C(object):
...
attr = Unicode(lazy=True)
or a group of lazy attrs (loaded together if either is accessed):
class C(object):
...
attr = Unicode(lazy=2)
attr2 = Unicode(lazy=2)
class D(object):
...
attr = Int(lazy='group 1')
attr2 = Int(lazy='group 2')
^ Is the syntax supported by this branch. I opted for a single "lazy" arg instead of having a "lazy" and "lazy_group." It seems simpler to me.