Regular expression as dictionary key?
Martin von Loewis
loewis at informatik.hu-berlin.de
Mon Dec 3 05:59:36 EST 2001
Luke <LLoeffler at home.com> writes:
> So you add a few lines to go exhaustively through the keys and
> accumulate matches... Still linear. I admitedly don't know much about
> the C implementation of dicts, but it seems there should be a way to
> leverage the dict's arrangement for fast regex keys.
You mean, you can inspect every element of a set in sub-linear time? I
guess you can solve P==NP as well :-)
Regards,
Martin
More information about the Python-list
mailing list