SyntaxWarning:import*仅允许在modu中使用

2024-10-01 17:22:15 发布

您现在位置:Python中文网/ 问答频道 /正文

我想让其他人的程序正常工作。我没有Python的经验。如果有人能在这里帮我,我将不胜感激。python2.6出现以下错误:

WSHSP.py:598: SyntaxWarning: import * only allowed at module level
  def drawComposition(self, solution, goalService):
WSHSP.py:598: SyntaxWarning: import * only allowed at module level
  def drawComposition(self, solution, goalService):
C:\WSPR\WebServicePath.py:3: DeprecationWarning: the sets module is deprecated
  from sets import Set

代码如下:

^{pr2}$

Tags: pyimportself程序onlydefsetslevel

热门问题