tag:blogger.com,1999:blog-9266717.post114773093221374795..comments2023-05-22T10:01:23.167-03:00Comments on Only Python: Optional typechecking: fun with "with"André Robergehttp://www.blogger.com/profile/08131391818998844540noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-9266717.post-1147808201076429552006-05-16T16:36:00.000-03:002006-05-16T16:36:00.000-03:00MY biggest issues I have with this are the same on...MY biggest issues I have with this are the same ones I have with all intrepted doc string implementations.<BR/><BR/>#1. all decorators (especially pass through) need to know about them and copy the doc string to the new decoration wrapper.<BR/><BR/>#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).<BR/><BR/>#3. No proper basic syntax checking. This is my biggest complaint with any doc string hack like this.<BR/><BR/>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.Anonymousnoreply@blogger.com