> I just ran across something that looks like a very unfortunate interface > change in the pickle module: > > Python 2.2: dump(object, file[, bin]) > Python 2.3: dump(object, file[, protocol[, bin]]) > > ...and indeed I have code, which uses pickle.dump(obj, f, True). > > Hmm, ok, so probably this means now (under python 2.3) I'm using > protocol number 1 (==True)?! Tricky. :-) Maybe that warrants a comment > in the docs? Are you sure you aren't misreading the docs? The number of arguments is the same. It's just that what was a boolean in 2.2 is an int in 2.3. IOW, protocol 0 is the old "text" protocol, protocol 1 is the old "binary" protocol, and protocol 2 is a new protocol introduced in Python 2.3. And indeed, 0==False, 1==True. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4