Python调试'if'条件,其值为false,但'print'显示为true

时间:2013-08-23 11:25:08

标签: python

这是一段非常简单的代码但不知何故从未进入if条件。我已经分别在条件中打印了所有值,我可以看到它们在控制台中是相同的,但很明显Python正在将它评估为false。

data = serializer.data
print data
socialid = data['socialid']
accesstoken = data['accesstoken']
graph = GraphAPI(accesstoken)
print graph.get('me?fields=id')['id']
print socialid
print graph.get('app/')['id']
print appid
if (graph.get('me?fields=id')['id'] == socialid) and (graph.get('app/')['id'] == appid):
    print "hello" 

我在这里遗漏了什么吗? print是否会忽略一些额外的字符(unicode ......某些东西?)

0 个答案:

没有答案
相关问题