|
From: <no...@so...> - 2001-06-30 11:40:31
|
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: Closed >Resolution: Fixed Priority: 5 Submitted By: Neil Rotstan (mrblah) >Assigned to: Finn Bock (bckfnn) 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 ---------------------------------------------------------------------- >Comment By: Finn Bock (bckfnn) Date: 2001-06-30 04:40 Message: Logged In: YES user_id=4201 I can reproduce this in 2.0. It is fixed in 2.1a1. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=437215&group_id=12867 |