【已解决】TypeError: bind() takes exactly one argument (2 given)
生活随笔
收集整理的这篇文章主要介绍了
【已解决】TypeError: bind() takes exactly one argument (2 given)
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
错误代码:
server.bind('0.0.0.0', 8000)正确代码:
server.bind( ('0.0.0.0', 8000) )两层括号
原因:bind函数内应传入元组。 外层括号是函数的括号;内层括号是元组的括号
总结
以上是生活随笔为你收集整理的【已解决】TypeError: bind() takes exactly one argument (2 given)的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 【可运行,刘汝佳代码】Trees on
- 下一篇: ConnectionRefusedErr