Paul Svensson wrote:
> On Tue, 3 May 2005, Nick Coghlan wrote:
>
>> I'd also suggest that the blocktemplate decorator accept any iterator,
>> not just
>> generators.
>
>
> So you want decorators on classes now ?
A decorator is just a function - it doesn't *need* to be used with decorator
syntax. I just think the following code should work for any iterator:
block blocktemplate(itr):
# Do stuff
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com