method to intercept string formatting % operations

Brad Allen bradallen137 at gmail.com
Fri Feb 5 18:48:24 CET 2010


On Fri, Feb 5, 2010 at 9:49 AM, Jean-Michel Pichavant
<jeanmichel at sequans.com> wrote:

> Anyway why would you want to use the tuple form ? it's beaten in every
> aspect by the dictionary form.

I'm subclassing a namedtuple, and adding some additional functionality
such as __getitem__, __setitem__, so that the namedtuple also behaves
like a dict.



More information about the Python-list mailing list