[Python-Dev] Re: Python-Dev Digest, Vol 9, Issue 17 (original) (raw)
Guido van Rossum guido at python.org
Mon Apr 5 19:30:23 EDT 2004
- Previous message: [Python-Dev] Re: Python-Dev Digest, Vol 9, Issue 17
- Next message: [Python-Dev] Re: Python-Dev Digest, Vol 9, Issue 17
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
One thing I was thinking about (aloud on #python) was a validator syntax, something resembling:
def isint(i): return isinstance(number, int): def ishashable(h): try: hash(h) return True except TypeError: return False # or raise exception def func(isint : 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/)
- Previous message: [Python-Dev] Re: Python-Dev Digest, Vol 9, Issue 17
- Next message: [Python-Dev] Re: Python-Dev Digest, Vol 9, Issue 17
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]