Hacker News new | past | comments | ask | show | jobs | submit login

Types are not associated with expressions in Python: evaluating an expression produces a typed value, whose type, and not only its value, depends on the type and/or values of the inputs. Example:

   def comparativeInsult(a,b):
      if b>a:
         return "try again"
      if a>b:
         return a/b
      else:
         return None
The type is, for all practical purposes, a part of the value of a Python object.



Such a thing is not a type. Not by the usual definition, which predates not only python but mechanical computation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: