--- a/degal/utils.py Mon Jun 15 01:42:45 2009 +0300
+++ b/degal/utils.py Mon Jun 15 02:58:30 2009 +0300
@@ -77,6 +77,15 @@
lazy_load = LazyProperty
lazy_load_iter = LazyIteratorProperty
+def unload (obj, *attrs) :
+ """
+ Un-load the named attributes from the given object.
+ """
+
+ for attr in attrs :
+ if attr in obj.__dict__ :
+ del obj.__dict__[attr]
+
def first (iterable) :
"""
Returns the first item from the iterable that evaluates to True, otherwise None.
@@ -86,7 +95,6 @@
>>> first("abc")
'a'
>>> first(('', list(), (), False))
- None
"""
for item in iterable :