homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zseil
Recipients
Date 2006年05月30日.08:35:23
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1326842
Oh, and another thing, unpickling exceptions
that were pickled with an older version
of Python will have strange effects:
Python 2.4.3 (#69, Mar 29 2006, 17:35:34)
 ...
>>> import pickle
>>> f = open('jar', 'wb')
>>> e = Exception('cucumbers', 'cabbage')
>>> e.args
('cucumbers', 'cabbage')
>>> pickle.dump(e, f)
>>> f.close()
>>> f = open('jar', 'rb')
>>> e = pickle.load(f)
>>> f.close()
>>> e.args
('cucumbers', 'cabbage')
Python 2.5a2 (trunk:46539M, May 30 2006, 05:02:24)
 ...
>>> import pickle
>>> f = open('jar', 'rb')
>>> e = pickle.load(f)
>>> f.close()
>>> e.args
()
>>> e.__dict__['args']
('cucumbers', 'cabbage')
History
Date User Action Args
2007年08月23日 14:40:19adminlinkissue1497319 messages
2007年08月23日 14:40:19admincreate

AltStyle によって変換されたページ (->オリジナル) /