On Wed, 17 Sep 2003 21:01:57 +0200 Max M <maxm at mxm.dk> wrote regarding Re: replace %(word) in a string: > class Wrapper: > > def __getitem__(self, key): > return locals().get(key, globals[key]) Shouldn't that be: return locals().get(key, globals()[key]) ^^ Cheers, Bill