Skip to content

Instantly share code, notes, and snippets.

@waptang
Created August 20, 2013 00:37
Show Gist options
  • Save waptang/6275821 to your computer and use it in GitHub Desktop.
Save waptang/6275821 to your computer and use it in GitHub Desktop.
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class Thing(object):
... pass
...
>>> x = Thing()
>>> setattr(x, ' ', True)
>>> setattr(x, '+', True)
>>> setattr(x, '', True)
>>> vars(x)
{'': True, ' ': True, '+': True}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment