|
From: <no...@so...> - 2001-06-28 21:39:06
|
Bugs item #437215, was opened at 2001-06-28 14:39 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=437215&group_id=12867 Category: Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Neil Rotstan (mrblah) Assigned to: Nobody/Anonymous (nobody) Summary: newline escaping broken on ascii pickle Initial Comment: It appears that newlines aren't escaped properly when you try to pickle a string in text mode (I actually had strings inside a list and was pickling the list). When you try to unpickle the data, it blows up. To duplicate, try something like: import pickle s1="line1\nline2\nline3" s2="line4\nline5\nline6" l = [s1, s2] p = pickle.dumps(l) # newlines won't be escaped l2 = pickle.loads(p) # blows up Pickling in binary mode seems to work fine. ie: ... p = pickle.dumps(l, 1) l2 = pickle.loads(p) # works correctly ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=437215&group_id=12867 |