Explicit variable declaration

Benjamin musiccomposition at gmail.com
Tue Apr 22 22:45:03 EDT 2008


On Apr 22, 7:39 pm, "Filip Gruszczyński" <grusz... at gmail.com> wrote:
> Hello everyone!
>
> It is my first message on this list, therefore I would like to say
> hello to everyone. I am fourth year student of CS on the Univeristy of
> Warsaw and recently I have become very interested in dynamically typed
> languages, especially Python.
>
> I would like to ask, whether there is any way of explicitly declaring
> variables used in a function? While I am pretty sure, that there is no
> such way in the language itself, I would like to know, whether there
> are any third-party tools to do that. This would be very useful for me
> during development, so I am looking for such a tool.

You mean the type? Not in 2.x, but in 3.x, there are function
annotations:

def a_function(arg1: int, arg2: str) -> None: pass

>
> --
> Filip Gruszczyński




More information about the Python-list mailing list