[Python-3000] Fwd: Conventions for annotation consumers (original) (raw)

Paul Prescod paul at prescod.net
Sun Aug 20 22:07:18 CEST 2006


On 8/20/06, Jim Jewett <jimjjewett at gmail.com> wrote:

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):

I don't believe that's true, because this is the syntax he showed:

@callmeta def foo( a: [ SetDoc("frobination count"), InRange(3,9) ], b: InSet([4,8,12]) ) -> IsNumber:

I guess I still don't really understand what he's getting at or what the value of @callmeta is in that example. It just seems like extra noise with no value to me...

Ron: what precisely does the @callmeta decorator do? If you can express it in code, so much the better.

Paul Prescod -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-3000/attachments/20060820/e8257c01/attachment.htm



More information about the Python-3000 mailing list