Skip to content

Instantly share code, notes, and snippets.

@franciscod
Last active February 23, 2017 12:47
Show Gist options
  • Save franciscod/2d44d09abc23a6fc1e87012efb0a90ab to your computer and use it in GitHub Desktop.
Save franciscod/2d44d09abc23a6fc1e87012efb0a90ab to your computer and use it in GitHub Desktop.

wat?

  • Copy these lines into a Python REPL
# ---8<---
class Wat:
    @property
    def wat(self):
        print("\n...wat...\n...wat!?\n\n ?!?!\n\n")
        return 42

a = Wat()
# --->8---
  • Now, type a., as if you were about to access some attribute of a. You should be seeing something like this:
>>> class Wat:
...     @property
...     def wat(self):
...             print("\n...wat...\n...wat!?\n\n ?!?!\n\n")
...             return 42
... 
>>> a = Wat()
>>> a.
  • PRESS TAB
  • ???
  • PRESS TAB AGAIN
  • ?!?!?!

links

@franciscod
Copy link
Author

Not a bug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment