A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-April/044096.html below:

[Python-Dev] Re: Python-Dev Digest, Vol 9, Issue 17

[Python-Dev] Re: Python-Dev Digest, Vol 9, Issue 17Guido van Rossum guido at python.org
Mon Apr 5 19:30:23 EDT 2004
> One thing I was thinking about (aloud on #python) was a validator 
> syntax, something resembling:
> 
>     def is_int(i):
>         return isinstance(number, int):
> 
>     def is_hashable(h):
>         try:
>             hash(h)
>             return True
>         except TypeError:
>             return False # or raise exception
> 
>     def func(is_int : number, hashable : key):
>         # code...

Please note that you seem to be using the syntax ``type: variable''.
We've settled on using ``variable: type'' instead.  (How to express
types is quite a different story...)

--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4