python+rabbitmq运行报错

文档中有声明交换器
channel.exchange_declare(exchange="hello-exchange",
type="direct",
passive=False,
durable=True,
auto_delete=False)
用了type,
运行报错
➜ chapter-2 python ./hello_world_consumer.py

Traceback (most recent call last):
File "./hello_world_consumer.py", line 14, in
auto_delete=False)
TypeError: exchange_declare() got an unexpected keyword argument 'type'
➜ chapter-2
查资料可能因为type是python的内置函数,一直找不到解决办法,
希望各位大神帮忙解惑

找不到原因,我改成
"hello-exchange",
"direct",
False,
True,
False

后可以使用,
把变量去掉了

http://blog.csdn.net/fgf00/article/details/52872730