arogozhnikov / python3_with_pleasure

A short guide on features of Python 3 with examples
3.63k stars 242 forks source link

Update README.md #1

Closed vfdev-5 closed 6 years ago

vfdev-5 commented 6 years ago

isinstance(x, [long, int]) -> isinstance(x, (long, int)) Otherwise :

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-18-a6ce29838f90> in <module>()
      1 a = 1
----> 2 isinstance(a, [long, int])

TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types
arogozhnikov commented 6 years ago

Thanks!