Skip to content

Instantly share code, notes, and snippets.

@laanwj
Created December 12, 2017 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laanwj/822e1d8684a7ffc20cf08156654b37f7 to your computer and use it in GitHub Desktop.
Save laanwj/822e1d8684a7ffc20cf08156654b37f7 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
import json
class notreallydict(dict):
def __init__(self, x):
dict.__init__(self, x)
self.x = x
def items(self):
return self.x
v = notreallydict([("1","2"),("1","2")])
print(json.dumps(v))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment