[Python-3000] Conventions for annotation consumers (original) (raw)
Paul Prescod paul at prescod.net
Wed Aug 16 07:34:46 CEST 2006
- Previous message: [Python-3000] Conventions for annotation consumers
- Next message: [Python-3000] Conventions for annotation consumers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 8/15/06, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
Paul Prescod wrote: > What if > two different groups start fighting over the keyword "type" or "doc" or > "lock"? Python already has a module system that allows you to use the > word "type" and me to use the word "type" without conflict But, in general, performing this disambiguation requires executing the module that is making the annotations. For a processor that only wants to deal with the source, this is undesirable.
This is true for every proposal we've described. Proposal 1 is:
Foo(int) Bar(module.type1)
Proposal two is:
{"Foo": int, "Bar": module.type1}
In either case, "int" and "module.type1" can be rebound. To say otherwise is to change Python's evaluation model drastically.
int = None float = file
Once you accept Python's dynamism, it makes sense to accept it both for the annotation "key" as for the "value". If you can convince Guido and the rest of the Python-dev team to reject it, then you can reject it for both equally. So the issue is a red herring.
Paul Prescod -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-3000/attachments/20060815/02465dc1/attachment.htm
- Previous message: [Python-3000] Conventions for annotation consumers
- Next message: [Python-3000] Conventions for annotation consumers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]