> 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/)
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