Static typing
Neil Hodgson
nhodgson at bigpond.net.au
Fri Jul 25 19:36:20 EDT 2003
Shane Hathaway:
> Well, here's a pattern I've been trying out for this purpose: use assert
> statements at the top of the function.
>
> def foo(bar, baz):
> assert isinstance(bar, int)
> assert isinstance(baz, str)
The Wing IDE will read assertions of the above form and provide more
assistance than with identifiers it knows nothing about:
http://wingide.com/psupport/wingide-1.1/node5.html#SECTION005800000000000000
00
Neil
More information about the Python-list
mailing list