dictionary sub-value lookup
dan at eevolved.com
Wed Feb 7 18:41:51 CET 2001
> I am kinda new to this whole object orientation thing, so
> there is probably an easy way of doing this, but the
> tutorials etc are sparse.
> I have an object M which contains N dictionaries. Inside
> dictionary N, is an identifier, Y, plus various other
> values, eg: Z.... is it possible to find M.Y.Z without
> looping through the whole of M, checking Y each time ?
> Since I will have to do a LOT of this, and M may be large,
> I need a fast method.
> Ideas/comments etc ?
What problem are you trying to solve? There may be simpler ways to do it...
that sounds incredibly complex. You could always have a dictionary that
does this help?
More information about the Python-list