Skip to content

Instantly share code, notes, and snippets.

@luisenriquecorona
Created April 18, 2019 17:33
Show Gist options
  • Save luisenriquecorona/b5e3cef58dd2de3532f9c8c11273ab63 to your computer and use it in GitHub Desktop.
Save luisenriquecorona/b5e3cef58dd2de3532f9c8c11273ab63 to your computer and use it in GitHub Desktop.
How to Break Your Code’s Flexibility
# In Python 2.X:
>>> type(L)
<type 'list'>
>>> type(type(L)) <type 'type'>
# In Python 3.X:
>>> type(L) <class 'list'> >>> type(type(L)) <class 'type'>
# Types: type of L is list type object # Even types are objects
# 3.X: types are classes, and vice versa # See Chapter 32 for more on class types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment