[Types-sig] PyDL RFC 0.02

Paul Prescod paul@prescod.net
Tue, 28 Dec 1999 03:38:42 -0500


Greg Stein wrote:
> 
> Nope. It sounded like Paul was suggesting different formats, suffixes, and
> purpose. I don't think we should go that route.

One format. One purpose. Two suffixes. Two maintenance strategies.

> It would seem best to have a .pyi file that a human can craft and
> maintain. It would be quite easy to have the type-check mode warn the user
> that they haven't declared some interface or something (so they can go
> and add it in). Heck, maybe the
> user did that on purpose, because the class isn't public. It would also be
> quite possible to invoke the type-checker with a mode that says "generate
> a .pyi file for me." The user can then edit the thing as needed.

But the whole point is that we don't want to be forced to maintain the
thing in a separate file. If you want to put some or all of the
declarations in your source file then we need a place to extract those
to. I could have just banished in-file declarations but it seemed that
we could easily extract them so why not allow the convenience?

> I also think that we'd want to avoid "combining the declarations" of two
> files. Again, the user may not want the second group of declarations. 

Then they shouldn't put declarations in their Python file.

> And
> the combination rules might be a bit hard to describe or handle (from the
> human's standpoint).

It's just concatenation! There is nothing hard about it.

 Paul Prescod