Bugs item #1947356, was opened at 2008-04-20 12:06
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=114534&aid=1947356&group_id=14534
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: khiltd (khiltd)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cannot use class NSCFDate
Initial Comment:
This may be an error on my part, but it seems genuinely impossible to reference the class NSCFDate from Python code.
More specifically, in trying to walk a property list, I need to call different functions to handle different data types, like so:
#Assuming 'p' is a plist object such as a Dictionary, Array, Date, String, Data, etc
return { NSCFDictionary: xd, NSCFArray: xa }.get(p.__class__, lambda v: v)(p)
This works perfectly, but when I attempt to introduce a new case for NSCFDate I get an error from the parser complaining that the class is undefined.
When I actually print this object's __class__ I see that its name is in fact prefixed by the magic double underscore, which is doubtlessly obfuscating it from public view; what I can't figure out is why. Am I not supposed to use CFDate objects from the Foundation bridge for some reason or is this a bug?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=114534&aid=1947356&group_id=14534
|