Mercurial > cpython-lru_cache-weakref
diff Lib/stdwin/rect.py @ 1260:b120cdd30fbc legacy-trunk
* Fix bug in tzparse.py for DST timezone
* Added whatis command to pdb.py
* new module GET.py (GL definitions from <gl/get.h>)
* rect.py: is_empty takes a rect as argument, not two points.
* Added tests for builtin round() [XXX not yet complete!]
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 29 Mar 1993 11:30:50 +0000 |
| parents | 1d22900f77b8 |
| children | 4192e24ec562 |
line wrap: on
line diff
--- a/Lib/stdwin/rect.py Mon Mar 29 10:50:29 1993 +0000 +++ b/Lib/stdwin/rect.py Mon Mar 29 11:30:50 1993 +0000 @@ -17,7 +17,8 @@ # Check if a rectangle is empty. # -def is_empty((left, top), (right, bottom)): +def is_empty(r): + (left, top), (right, bottom) = r return left >= right or top >= bottom @@ -36,7 +37,7 @@ if top < t: top = t if right > r: right = r if bottom > b: bottom = b - if is_empty((left, top), (right, bottom)): + if is_empty(((left, top), (right, bottom))): return empty return (left, top), (right, bottom) @@ -47,7 +48,7 @@ def union(list): (left, top), (right, bottom) = empty for (l, t), (r, b) in list[1:]: - if not is_empty((l, t), (r, b)): + if not is_empty(((l, t), (r, b))): if l < left: left = l if t < top: top = t if r > right: right = r
