On 18 Apr., 20:07, Aaron Watters <[EMAIL PROTECTED]> wrote: > I don't really know, but I think "fixing" the above issue for > string.format(...) might involve changing the representation of > every python stack frame... not worth it in this case if there > is any penalty (afaik there isn't).
In Python 2.6 the format function simply calls PyDict_GetItem on the dictionary object and raises a KeyError if it fails. A dict emulation would require one more lookup if the fast lookup has no result. It would be a speed penalty in the general case if this lookup would be implemented in PyDict_GetItem but handling a special case in the format implementation might not look that bad. -- http://mail.python.org/mailman/listinfo/python-list