[Python-Dev] Pickling objects that return string from reduce (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Thu Jul 20 08:47:40 CEST 2006
- Previous message: [Python-Dev] Pickling objects that return string from reduce
- Next message: [Python-Dev] new guy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Bruce Christensen wrote:
If obj has no module attribute (or if it is None), pickle (didn't check cPickle) also does
for n, module in sys.module.items(): if "module-ignored": continue if getattr(module, result, None) is obj: break # use n as module name What is "module-ignored" above? It's obviously not a literal string...
It's skipped if module is None (skip dummy package entries) or n=='main'.
Regards, Martin
- Previous message: [Python-Dev] Pickling objects that return string from reduce
- Next message: [Python-Dev] new guy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]