classification
Title: plistlib.writePlistToBytes does not exist on 2.6 (osx) and documentation does not include information about version
Type: Stage: resolved
Components: Library (Lib), macOS Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: ned.deily, ronaldoussoren, ssbarnea
Priority: normal Keywords:

Created on 2011-04-27 13:06 by ssbarnea, last changed 2011-04-27 19:50 by ned.deily. This issue is now closed.

Messages (2)
msg134561 - (view) Author: Sorin Sbarnea (ssbarnea) * Date: 2011-04-27 13:06
On OS X (10.6) with Python 2.6 

import plistlib
plistlib.writePlistToBytes(dict())
AttributeError: 'module' object has no attribute 'writePlistToBytes'

Python documentation contains no information regarding when writePlistToBytes was add. http://docs.python.org/dev/library/plistlib.html#plistlib.writePlistToBytes
msg134611 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-04-27 19:50
You are looking at the documentation for Python 3, not Python 2.  For Python 2.6, you should refer to its documentation: http://docs.python.org/release/2.6.6/library/plistlib.html

For Python 3, many references to strings were changed to bytes as part of the changing of Unicode strings and 8-bit strings in Python 2 to strings and bytes in Python 3.  This was one of them.
History
Date User Action Args
2011-04-27 19:50:37ned.deilysetstatus: open -> closed

type: behavior ->
assignee: ronaldoussoren -> ned.deily
versions: - Python 3.1, Python 2.7, Python 3.2, Python 3.3, Python 3.4
nosy: + ned.deily

messages: + msg134611
resolution: not a bug
stage: resolved
2011-04-27 13:06:58ssbarneacreate