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.
Created on 2011年02月02日 19:10 by bobveznat, last changed 2022年04月11日 14:57 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| plistlib.patch | bobveznat, 2011年02月02日 19:10 | Patch adding ignoreNone parameter | ||
| Messages (4) | |||
|---|---|---|---|
| msg127750 - (view) | Author: Bob Van Zant (bobveznat) | Date: 2011年02月02日 19:10 | |
The Apple plist format does not support None or Null values in its output. A Null value in plist is denoted by the absence of the key in the data structure. The python plist writer generates a TypeError when a None value is encoded. This issue is to track dealing with None values. A suggestion is to have a flag on the various plist write functions and methods that will allow ignoring None values. No changes are required to the plist reader. |
|||
| msg189911 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2013年05月24日 14:07 | |
At first I didn't like the proposal, but when I looked at the JSON module I noticed it has similar functionality for ignoring keys that cannot be represented in a JSON file. I'll look into this after merging #14455. The JSON library has two other options that might be useful for the plistlib library: sort_keys (sort the keys in the serialization of of dicts) and default(obj), which is a function for transforming values that cannot be represented natively. |
|||
| msg228560 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年10月05日 11:56 | |
Note that binary plist format supports None. |
|||
| msg241873 - (view) | Author: Behdad Esfahbod (Behdad.Esfahbod) | Date: 2015年04月23日 18:28 | |
plistlib's internal implementation already supports sort_keys and skipkeys, those just are not wired to load() and loads(). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:12 | admin | set | github: 55310 |
| 2015年04月23日 18:28:08 | Behdad.Esfahbod | set | nosy:
+ Behdad.Esfahbod messages: + msg241873 |
| 2014年12月03日 19:40:44 | Matt.Hansen | set | nosy:
+ Matt.Hansen |
| 2014年10月05日 11:56:41 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg228560 |
| 2013年05月24日 14:07:39 | ronaldoussoren | set | versions:
+ Python 3.4, - Python 2.7 nosy: + ned.deily messages: + msg189911 assignee: ronaldoussoren |
| 2011年02月04日 17:43:31 | eric.araujo | set | nosy:
+ jvr, ronaldoussoren |
| 2011年02月02日 19:10:51 | bobveznat | create | |