post_data = None if post_args is None else urllib.urlencode(post_args)
我无法理解这段代码的真正作用。有帮助吗?
谢谢。
最佳答案
post_data = None if post_args is None else urllib.urlencode(post_args)
等同于:
if post_args is None:
post_data = None
else:
post_data = urllib.urlencode(post_args)
关于python - 与下面 Python 中的句子等效的代码是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6964194/