On May 19, 2006, at 1:52 PM, Guido van Rossum wrote: >> 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.
Ok. I'm also wondering whether order of evaluation will be constrained and whether missing annotations result in a sentinel value or are just missing. I'd propose that MAKE_FUNCTION's arg has a flag bit which indicates that type annotations are present. If the flag is set, an integer value is popped off the stack which is used as a bit array to determine how the default arguments and type annotations are mixed. My apologies if this is getting too far ahead of the process. Thanks for listening -Tony _______________________________________________ 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
