Claudiu Popa added the comment:

It works in IDLE because it registers a custom pickling for code objects, in 
idlelib.rpc:

  copyreg.pickle(types.CodeType, pickle_code, unpickle_code)


where pickle_code / unpickle_code calls marshal.dumps/loads.

Although, I admit that this is weird. If idlelib.rpc is using this for 
transferring data between RPC instances, that's okay, but leaking the behaviour 
in the IDLE's interactive interpreter is not that okay, because leads to 
different results and expectancies between IDLE and Python's interactive 
interpreter.

----------
nosy: +Claudiu.Popa

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21986>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to