mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Add cmp() function
This commit is contained in:
parent
b32212d451
commit
f187c43280
@ -896,3 +896,12 @@ if __name__ == "__main__":
|
||||
|
||||
sl = SiteList(pts)
|
||||
voronoi(sl, c)
|
||||
|
||||
def cmp(a, b):
|
||||
"""Compare the two objects x and y and return an integer according to the
|
||||
outcome. The return value is negative if x < y, zero if x == y and strictly
|
||||
positive if x > y.
|
||||
|
||||
In python 2 cmp() was a built in function but in python 3 is gone.
|
||||
"""
|
||||
return (a > b) - (a < b)
|
||||
|
Loading…
x
Reference in New Issue
Block a user