[Python-3000] Type annotations: annotating generators

Tony Lownds tony at printra.net
Fri May 19 23:31:09 CEST 2006


On May 19, 2006, at 1:51 PM, Collin Winter wrote:

> On 5/19/06, Tony Lownds <tony at printra.net> wrote:
>> I've been hacking on such a system, called "t_types". It is in pre-
>> release form right now.
>> It actually deduces type usage using bytecode simulation, before run-
>> time.
>
> What do you mean by "bytecode simulation" and "before runtime"?
>

Before runtime means that t_types does static type checking. Like  
Pychecker, it should be
used during development.

t_types operates on bytecode, not source or AST, and has it's own  
loop, and stack to simulate the types
that would occur when Python executes the bytecode. Hopefully that  
makes sense. The upshot is that
if type annotations don't make it to bytecode, t_types is screwed :)

> Also, is there somewhere to read about/download this system?
>

No, not yet. It has a long way to go before even moderately complex  
programs
can be checked. I'll post it before too long or contact me off-list.

-Tony




More information about the Python-3000 mailing list