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

Paul Prescod paul at prescod.net
Sat Aug 19 21:19:54 CEST 2006


On 8/19/06, Ron Adam <rrr at ronadam.com> wrote:

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

What extra information or value does the callmeta decorator provide? For the sake of argument, I'll presume it has some useful function. Even so, it doesn't make sense to explictly attach it to every function.

Imagine a hundred such functions in a module. Would it be better to do this:

@callmeta def func1(..): ...

@callmeta def func2(..): ...

@callmeta def func3(..): ...

@callmeta def func4(..): ...

@callmeta def func5(..): ...

Or to do this:

func1(...):...

func2(...):...

func3(...):...

func4(...):...

func5(...):...

callmeta()

Paul Prescod -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-3000/attachments/20060819/c0ac90cc/attachment.html



More information about the Python-3000 mailing list