On 2007-06-02, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Fri, 01 Jun 2007 14:22:29 -0300, Warren Stringer <[EMAIL PROTECTED]> > escribió: > >> I am not insisting on anything. I use ``c[:]()`` as shorthand >> way of saying "c() for c in d where d is a container" > > I begin to think you are some kind of Eliza experiment with > Python pseudo-knowledge injected.
I wish I'd said that. > Anyway, the code below defines a simple "callable" list; it > just calls each contained item in turn. Don't bother to use > [:], it won't work. > > py> class CallableList(list): > ... def __call__(self): > ... for item in self: > ... item() Now all we need are user-definable matched-pair-delimiter-constructors for anonymous user-classed objects. ;) -- Grant Edwards grante Yow! I smell a RANCID at CORN DOG! visi.com -- http://mail.python.org/mailman/listinfo/python-list