Created
June 21, 2011 22:38
-
-
Save dcolish/1039121 to your computer and use it in GitHub Desktop.
nasty badness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Foo(object): | |
| def __repr__(self): | |
| return "<Silly Human, I'm not real>" | |
| def __eq__(self, b): | |
| return True | |
| def __getattr__(self, meh): | |
| return Foo() | |
| mysql = Foo() | |
| if mysql: | |
| print mysql.database |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment