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.

Author ronaldoussoren
Recipients Behdad.Esfahbod, ned.deily, ronaldoussoren
Date 2015-04-27.11:02:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430132527.48.0.989196994064.issue24040@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-04-27 11:02:07ronaldoussorensetrecipients: + ronaldoussoren, ned.deily, Behdad.Esfahbod
2015-04-27 11:02:07ronaldoussorensetmessageid: <1430132527.48.0.989196994064.issue24040@psf.upfronthosting.co.za>
2015-04-27 11:02:07ronaldoussorenlinkissue24040 messages
2015-04-27 11:02:07ronaldoussorencreate