Currently, Lib/Cookie.py relies on being able to import _idmap -- an internal implementation detail -- from string.py. Given that string.py includes a comment "Note that Cookie.py bogusly uses _idmap :(", it seems this might be something worth fixing. The attached patch resolves this issue by having Cookie.py generate its own copy of _idmap.