Bengt Richter wrote:
On Mon, 24 Jan 2005 20:35:09 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote:

from presets import presets, curry
@presets(verbose=True, a=1, b=2, deftime=__import__('time').ctime())

... def foo(): ... print (a, b) ... print deftime ...

presets: -- "name(?)" means name may be unused
          a = 1
          b = 2
    deftime = 'Mon Jan 24 12:16:07 2005'


foo()

(1, 2) Mon Jan 24 12:16:07 2005

Not much reaction

Sorry, it's definitely cool -- I was just waiting for you to post the Cookbook link so I could see how you did it. ;)


Steve
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to