[storm] question about ReferenceSet
Gustavo Niemeyer
gustavo at niemeyer.net
Tue Dec 11 22:46:30 GMT 2007
Hello Stephan,
> I'm new to storm and really like it so far. Until now I've used my own
> homegrown database wrapper (so I can't compare to SQLAlchemy or SQLObject).
I'm glad that you enjoy it.
> I've a question about ReferenceSet. The name implies some relation to, well,
> sets. Is it planned that the set interface will be supported sometimes in the
> future?
It may be, but notice that the "set" naming isn't about being able to do
Python-style set operations in this case, but rather about the fact that
this type offers access to "a set of referenced objects".
> For example, if I have some classes 'User' and 'Group', I'd like to be able to
> do something like this:
> accessGroups = set([grp1, grp2, grp3])
> if usr.groups & accessGroups:
> doSomething
This does look like an interesting feature, and at first sight I can't
think of any incoveniences about it. It's been added it to the TODO
file for future consideration.
Thanks for the suggestion.
--
Gustavo Niemeyer
http://niemeyer.net
More information about the storm
mailing list