On 4/21/05, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > It strikes me that with something like this lexical declaration, we
> > could abuse decorators as per Carl Banks's recipe[1] to get the
> > equivalent of thunks:
>
> "abuse" being the operative word.
Yup. I was just drawing the parallel between:
@withfile("readme.txt")
def thunk(fileobj):
for line in fileobj:
print line
and
@withfile("readme.txt"):
# called by withfile as thunk(fileobj=<file object>)
for line in fileobj:
print line
STeVe
--
You can wordify anything if you just verb it.
--- Bucky Katt, Get Fuzzy
_______________________________________________
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