On 8/19/06, Paul Prescod <[EMAIL PROTECTED]> wrote: > On 8/19/06, Ron Adam <[EMAIL PROTECTED]> wrote:
> ... don't understand the virtue of bringing > decorators into the picture. Yes, they are > one consumer of metadata. They aren't being brought in as sample *consumers*; they are being suggested as *producers* of metadata. The following works to assert the data >>> def f(a, b): ... >>> f.a=int We're discussing the alternative of >>> def f(a:int, b): which is better for some things -- but much worse for others; if the metadata is any longer than int, it is almost certainly worse. So (I believe) he is suggesting that we just reuse decorator syntax >>> @sig(a=int) ... def f(a, b): This keeps the single function declaration line short and sweet, reflecting (modulo "self" and a colon) how it is actually called. It gets the annotations (including type information) up where they should be, but they don't overwhelm the variable names. Whether to also add signature expressions (to make @sig decorators easier to write) is a separate question; the key point is not to mess with the one-line function summary. -jJ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com