저는 파이썬에서 새롭고이 문제가 있습니다. 내 스크립트를 실행하면이 오류를 보여줍니다ImportError : 'inf'라는 이름을 가져올 수 없습니다.
Traceback (most recent call last):
File "./message", line 2, in <module>
from src.graph_lib import *
File "/export/home/xsymersk/TGR/src/graph_lib.py", line 2, in <module>
from math import inf
ImportError: cannot import name 'inf'
내 코드는이 수입 구조가 있습니다
graph_lyb.py :
from src.dfs_lib import *
from math import inf
from collections import Counter
from operator import itemgetter
dfs_lib.py :
from enum import Enum
을 message.py :
from src.graph_lib import *
from sys import stdin
forest.py :
from src.graph_lib import *
from sys import stdin
race.py :
from src.graph_lib import *
from sys import stdin
코드 inf
수입없이 실행됩니다.
'math.inf' 파이썬 3.5에서 추가되었다 스스로를 추가 할 수 있습니다. – vaultah