标签:python
错误:Django RuntimeError: maximum recursion depth exceeded
原因出自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)] }12345678910111213141234567891011121314
改成
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)] }
本文出自 “尘” 博客,请务必保留此出处http://zhangpan.blog.51cto.com/2818271/1950281
win10启动django项目报错 Django RuntimeError: maximum recursion depth exceeded
标签:python
原文地址:http://zhangpan.blog.51cto.com/2818271/1950281