Closed JPFrancoia closed 8 years ago
So it appears None and str types are not orderable...
Nice catch. Indeed, IIRC this is new behaviour in python3, is used to be that None
would compare smaller than anything. It may work to just replace best = (2, None)
with best = (2, '')
to get the same effect, but then the line with return best[1]
would have to check for the empty string and convert it back into a None
before returning it.
issue has been fixed on py3k branch, ill make a pr now..
I think you also have to:
if cur > best:
best = cur
if best[1] == '':
return None
else:
return best[1]
As rfk mentionned.
The return value only ever gets checked once for None,
I changed the check to fail for '' as well, so now we don't need None to be returned ^^
Ok
Hi,
I'm trying to create a patch for one of my application. I'm on OSX captain with python3.5 this times.
Let's say I have an app:
When I run
for the version 1.1, the zip for the new version is correctly created, no problem. But the creation of the patch fails:
Looking at the corresponding file:
I tried to print cur and best to see what's going wrong:
So it appears None and str types are not orderable...