New submission from Jamie Bliss: Cookie.Morsel lacks in properly overloading dict methods, amongst other things: * .__eq__() does not take .key and .value into account * .copy() returns a dict, not a Morsel * .update() allows invalid attributes in, eg Morsel().update({'eggs':'spam'}) works but Morsel()['eggs'] = 'spam' fails * .__len__() includes unset keys (why does it set them to an empty string?) * .__repr__() doesn't print out attributes (path, comment, etc) * Handling of unicode is fuzzy at best: try Morsel().set(u'eggs\u00bf', u'\u00f1', u'\00f1'.encode('utf-8')) * Specifying the idmap and translate function in .set() seems wrong * Setting .key doesn't check against invalid keys (eg, reserved names) * The entire Morsel class is undocumented * There is no way to automatically sync .value and .coded_value
---------- components: Library (Lib) messages: 63144 nosy: astronouth7303 severity: normal status: open title: Cookie.Morsel interface needs update type: behavior versions: Python 2.5, Python 2.6 __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2211> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com