[Python-3000] What's the point of annotations? (original) (raw)
Guido van Rossum guido at python.org
Wed Jan 3 18:43:25 CET 2007
- Previous message: [Python-3000] What's the point of annotations?
- Next message: [Python-3000] What's the point of annotations?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 1/3/07, Collin Winter <collinw at gmail.com> wrote:
PS: I think it's interesting how nearly all the use-cases mentioned involve adding type information to functions.
Not surprising, since that's the context where this was first brought up. The earliest proposals did suggest standard type-checking and/or adaptation semantics. Those were shot down, but the conclusion was that some sort of syntax to tie attributes directly to arguments would make it much easier to implement and experiment with alternative schemes. Not all of those schemes need to use decorators, BTW -- it is easily conceivable to use a metaclass that implements some kind of of type checking or adaptation for all methods that have any kind of argument annotation.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-3000] What's the point of annotations?
- Next message: [Python-3000] What's the point of annotations?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]