esnme/ultrajson — Issue #29: Strange result when trying to serialize a lambda
Author: kmanley
Created: 2011-12-20 18:11:43+00:00
State: open

Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ujson
>>> ujson.dumps(lambda x : x)

'{"func_closure":null,"func_code":{"co_argcount":1,"co_cellvars":[],"co_code":"|\\u0000\\u0000S","co_consts":[null],"co_filename":"","co_firstlineno":1,"co_flags":67,"co_fre
evars":[],"co_lnotab":"","co_name":"","co_names":[],"co_nlocals":1,"co_stacksize":1,"co_varnames":["x"]},"func_defaults":null,"func_dict":{},"func_doc":null,"func_globals":
{"__builtins__":{"Ellipsis":{},"False":false,"None":null,"NotImplemented":{},"True":true},"__name__":"__main__","ujson":{},"__doc__":null,"__package__":null},"func_name":""
}'