On 2011-03-05 12:05:43 -0800, Paul Rubin said:
Ravi <ra.ravi....@gmail.com> writes:
I can extend dictionary to allow for the my own special look-up
tables. However now I want to be able to define multidimensional
dictionary which supports look-up like this:
d[1]['abc'][40] = 'dummy'
Why do that anyway? You can use a tuple as a subscript:
d[1,'abc',40] = 'dummy'
Depends on the use cases. If you only want to access d by a full
tuple, that's fine. If you want to access all the entries below d[1],
it's a problem. And if you want to access entities randomly by an
arbitrary dimension, you probably want a database (as others have
pointed out).
-Tom
--
http://mail.python.org/mailman/listinfo/python-list