Ronald Oussoren added the comment:

To react to myself: checking for self.dict_type might break users that pass in 
a callable:

   x = plistlib.load(fp, dict_type=lambda:{})

As Behdad memtioned testing that the type isn't list would be better:

   if not isinstance(..., list):


That attached patch adds a testcase and removes replaces the test for type({}) 
for something better. 

Note: it also replaces ``type([])`` with ``list``, the latter is cleaner.

----------
Added file: http://bugs.python.org/file39215/issue-24040.txt

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24040>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to