Issue 18926: plistlib - str converted to bool (original) (raw)
Issue18926
Created on 2013-09-04 21:51 by VertigoRay, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (2) | ||
---|---|---|
msg196959 - (view) | Author: Ray (VertigoRay) | Date: 2013-09-04 21:51 |
A plist with: My key False will parse to a dict as: {'My key': False} Expected: {'My key': 'False'} If bool(False) is needed, the plist should say: My key | ||
msg196963 - (view) | Author: Ray (VertigoRay) | Date: 2013-09-04 22:00 |
Disregard, I think. I'm not sure why, but my current app seems to be doing the converting. >>> import plistlib >>> pl = {'My key': 'False'} >>> plist = plistlib.writePlistToString(pl) >>> plist '\n\n\n\n\tMy key\n\tFalse\n\n\n' >>> plistlib.readPlistFromString(plist) {'My key': 'False'} >>> pl = {'My key': False} >>> plist = plistlib.writePlistToString(pl) >>> plist '\n\n\n\n\tMy key\n\t\n\n\n' >>> plistlib.readPlistFromString(plist) {'My key': False} |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:50 | admin | set | github: 63126 |
2013-09-04 22:00:57 | VertigoRay | set | status: open -> closedresolution: not a bugmessages: + |
2013-09-04 21:51:08 | VertigoRay | create |