[Python-Dev] Re: "groupby" iterator
Andrew Bennetts
andrew-pythondev at puzzling.org
Wed Dec 3 19:23:48 EST 2003
On Wed, Dec 03, 2003 at 08:28:47PM +0200, Christos Georgiou wrote:
>
> There is a solution involving a Voodoo and an (unexported)
> VoodooAttribute class which *can* solve this (Voodoo.__getattr__ returns
> an instance of VoodooAttribute (subclass of Voodoo overloading
> __call__), whose .__call__ method returns an instance of Voodoo), *but*
> then you can't use:
[...]
This discussion is starting to remind me of something that's been in the
Twisted sandbox for quite a while:
http://cvs.twistedmatrix.com/cvs/sandbox/cake.py?rev=1.4&content-type=text/vnd.viewcvs-markup
The code isn't exactly clear, but the example in the if __name__ ==
'__main__' block at the bottom should give you some idea of what it can
do... I can't escape the feeling that this discussion is slowly reinventing
cake.py.
I'm not sure I'd really like to read code that uses some of the more
outlandish proposals in this thread... it looks like a good way to write
convoluted code.
-Andrew.
More information about the Python-Dev
mailing list