AW: Are there any PEPs for typed arguments?

Jeff Shannon jeff at ccvcorp.com
Tue Dec 4 15:25:04 EST 2001


"F. GEIGER" wrote:

> So now I have to implement it. To assure requirements and promises as
> documented I have to convert
>
> object.meth(mine: MyClass, yours: YourClass)
>
> into
>
> def object.meth(mine, yours):
>    assert isinstance(mine, MyClass)
>    assert isinstance(yours, YourClass)

Seems to me that it'd be pretty simple to write a file-processing script that
would search out lines of the first form, and convert them into the second
form...  just run that script over each of your source files once, before first
running them, a la pychecker.

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list