国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

運(yùn)行django出現(xiàn)遞歸報(bào)錯(cuò)的解決辦法

2019-11-11 02:43:54
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

在運(yùn)行django程序的時(shí)候,出現(xiàn)下面的問(wèn)題

RuntimeError: maximum recursion depth exceeded in cmp

說(shuō)是遞歸深度有問(wèn)題,在網(wǎng)上查了好久,終于解決了。

原來(lái)是python自己的問(wèn)題,需要將fuctools.py進(jìn)行修改。具體如下

To fix the PRoblem replace this (about line 56 in python/Lib/fuctools.py):

    convert = {    '__lt__': [('__gt__', lambda self, other: other < self),               ('__le__', lambda self, other: not other < self),               ('__ge__', lambda self, other: not self < other)],    '__le__': [('__ge__', lambda self, other: other <= self),               ('__lt__', lambda self, other: not other <= self),               ('__gt__', lambda self, other: not self <= other)],    '__gt__': [('__lt__', lambda self, other: other > self),               ('__ge__', lambda self, other: not other > self),               ('__le__', lambda self, other: not self > other)],    '__ge__': [('__le__', lambda self, other: other >= self),               ('__gt__', lambda self, other: not other >= self),               ('__lt__', lambda self, other: not self >= other)]}

to that:

    convert = {    '__lt__': [('__gt__', lambda self, other: not (self < other or self == other)),               ('__le__', lambda self, other: self < other or self == other),               ('__ge__', lambda self, other: not self < other)],    '__le__': [('__ge__', lambda self, other: not self <= other or self == other),               ('__lt__', lambda self, other: self <= other and not self == other),               ('__gt__', lambda self, other: not self <= other)],    '__gt__': [('__lt__', lambda self, other: not (self > other or self == other)),               ('__ge__', lambda self, other: self > other or self == other),               ('__le__', lambda self, other: not self > other)],    '__ge__': [('__le__', lambda self, other: (not self >= other) or self == other),               ('__gt__', lambda self, other: self >= other and not self == other),               ('__lt__', lambda self, other: not self >= other)]}
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 奉化市| 新宁县| 巴青县| 凯里市| 丰台区| 洪江市| 湖北省| 田林县| 循化| 濮阳市| 博乐市| 本溪| 和田市| 襄城县| 石嘴山市| 仁布县| 凤庆县| 绵竹市| 海盐县| 江川县| 新密市| 息烽县| 洛宁县| 扶绥县| 玉龙| 邢台县| 安义县| 古田县| 华蓥市| 陇川县| 巴南区| 贵阳市| 文成县| 隆德县| 邵东县| 来安县| 武陟县| 昌宁县| 乌兰县| 上虞市| 阳城县|