Using Queue in python

前端 未结 5 1686
无人及你
无人及你 2021-02-06 23:31

I\'m trying to run the following in Eclipse (using PyDev) and I keep getting error :

q = queue.Queue(maxsize=0) NameError: global name \'queue\' is not defined<

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-07 00:34

    make sure your code is not under queue.py rename it to something else. if your file name is queue.py it will try to search in the same file.

提交回复
热议问题