Applications Google
Menu principal

Post a Comment On: Only Python

"Optional typechecking: fun with "with""

1 Comment -

1 – 1 of 1
Anonymous Anonymous said...

MY biggest issues I have with this are the same ones I have with all intrepted doc string implementations.

#1. all decorators (especially pass through) need to know about them and copy the doc string to the new decoration wrapper.

#2. again with decorators, in this example, they would need to know to add the 'with __typecheck__' inside the wrapper implementation. (well ok, this depends on how __typecheck__ is implemented).

#3. No proper basic syntax checking. This is my biggest complaint with any doc string hack like this.

I would perfer a decorator which describes the argiments and adds the type checking at that level. This has the bennifit of also being valid python, can be made optional (with the with statement if you so wish, or with some other means), and is just as obvious.

4:36 PM

Spammers: none shall pass.
You can use some HTML tags, such as <b>, <i>, <a>

Comments on this blog are restricted to team members.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot