On 25 Jan 2006 09:35:50 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
thx! indeed, it worked -- took me some time to figure out how to
implement the setting of attributes, too. i finally managed to get that
done using super:
Seems good.
snip
the ``~.__setattr__()`` method tests for the
On 24 Jan 2006 09:30:00 -0800, [EMAIL PROTECTED] wrote:
some time after posting my `Linkdict recipe`__ to aspn__
-- basically, a dictionary with run-time delegational
lookup, but this is not important here -- i thought gee
that would be fun to make such a customized dictionary
thingie an instance
thx! indeed, it worked -- took me some time to figure out how to
implement the setting of attributes, too. i finally managed to get that
done using super:
custom dictionary, unchanged::
class CustomDict( dict ):
defaultValue = 'THIS ITEM NOT AVAILABLE'
def __getitem__(
some time after posting my `Linkdict recipe`__ to aspn__
-- basically, a dictionary with run-time delegational
lookup, but this is not important here -- i thought gee
that would be fun to make such a customized dictionary
thingie an instance dictionary, and get some custom
namespace behavior out