On 20 August 2014 17:26, Ethan Furman <ethan@stoneleaf.us> wrote:
On 08/20/2014 09:04 AM, Guido van Rossum wrote:
I expect that we'll find a way for type and other annotations to coexist [...]
Another thing to keep in mind, and which my scription utility will probably switch to, is that we are not stuck only with __annotations__ -- we can also add other attributes, such as __scription__ or __plac__ or __my_custom_stuff__ or whatever.
It could easily be that coexisting means use a decorator instead of annotations, and store the info in a different attribute. As a bonus this method is even 2.x compatible.
The obvious thought is, if a decorator is a sufficiently good notation, is there any need for annotations at all (even for static typing)? But that argument does seem to imply that using annotations for anything *other* than static typing is pointless. (As in, has more disadvantages than advantages). I wonder if that's the real issue here? Paul