Skip to content

Instantly share code, notes, and snippets.

@binarin
Created June 10, 2013 09:14
Show Gist options
  • Save binarin/5747453 to your computer and use it in GitHub Desktop.
Save binarin/5747453 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
class A(dict):
def __contains__(self, k):
return k in self
a = A()
a['a'] = 10
print 'a' in a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment