3

如何从 Python 字典中获取 NSDictionary(以便我可以调用description它)?

4

1 回答 1

4
>>> d = NSDictionary.dictionaryWithDictionary_({"foo": "bar"})
>>> type(d)
<objective-c class __NSDictionaryI at 0x7fff7ae34688>
>>> d.description()
u'{\n    foo = bar;\n}'
>>> d
{
    foo = bar;
}
>>> 
于 2013-01-23T03:27:00.157 回答