On 5/19/06, Tony Lownds <[EMAIL PROTECTED]> wrote: > The proposals I've seen here for type annotation syntax seem very > intentionally > designed NOT to lock in any particular type system.
Right. > So far nothing seems to preclude > static type checking, at least the way t_types works. I hope the type > annotation syntax > for functions goes in, it's a lot more readable than decorators. > > Here's an idea of the flavor of type checking t_types gives. > [snipped] This looks good, it would be able to make good use of the proposed syntax, and the notation you use isn't too different from what Collin is proposing either (e.g. int|None, list[int]). > Question for Guido/Collin: > > Out of curiosity, are there concrete plans for how the type > annotation syntax for functions > translates into bytecode? I suspect rather similar to the way default parameter values are handled today: we generate bytecode that evaluates the type annotations and somehow saves them on the signature object which is part of the function object. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
