[Types-sig] Type Annotations Progress report
Tim Peters
tim.one@home.com
Fri, 16 Mar 2001 01:01:06 -0500
[Paul Prescod]
> Before I documented everything I wanted to do a real-world test. So I
> added type annotations to the os module. I even added a new type that
> was local to that module for handling P_WAIT, P_NOWAIT. I'd appreciate
> if people would at least take a cursory peek at the os module, if not
> the implementation.
>
> OS: www.prescod.net/pytypes/os.py
> Implementation: http://www.prescod.net/pytypes/typecheck.py
Paul, you know the rule: each time this SIG reincarnates, the first msg
announcing an actual implementation kills it again <0.7 wink>.
> ...
> Remember that this is experimental, transitional, prototype, type
> annotation system. The syntax is not ideal. Nevertheless, I think it is
> quite simple, easy to use and immediately useful.
Yup!
Note that there are several misdeclarations, such as:
def execl(file, *args):
"""execl(file, *args)
Execute the executable file with argument list args, replacing the
current process. """
__types__= {"file: Old directory name": IString,
"args: New directory name": IString}
__paramcheck__()
execv(file, args)
args should be a tuple of IStrings, right?
mostly-a-type-system-exists-to-help-programmers-debug-type-
declarations<wink>-ly y'rs - tim