[Python-3000] Use cases for type annotations? (WAS: Type parameterization)

Paul Moore p.f.moore at gmail.com
Sat May 20 15:25:03 CEST 2006


On 5/20/06, Talin <talin at acm.org> wrote:

> Here's a list of use cases that I can think of:
[...]

Interesting. Can you elaborate one of these into a strawman example,
with code, that we can discuss? There are a number of issues I can
see, but it's too easy to be vague without a concrete example to pick
apart.

As an example, with type checking, I'd like to see how the interface
between annotated and non-annotated code would work. Would we hit the
same problems as "const" in C++? Would people need to add "casts"
(conversions) to use annotated libraries? What happens if an
annotation is too strict (say, a function documented as taking int or
long, which gets passed a gmpy.mpz (efficient long integer) instance)?

Feel free to pick a different use case, if you prefer.

Paul.


More information about the Python-3000 mailing list