diff options
author | Guido van Rossum <guido@python.org> | 1993-03-29 11:30:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-03-29 11:30:50 (GMT) |
commit | e7113b6b3dd99b4d05fc81c18e1c2a94fa8e1ebb (patch) | |
tree | d779bf09fa3a7df8bd5876f398f353348f13f9de /Lib/stdwin | |
parent | 04321d1e472ac2ffd06776f117a5ec14e76b7bb7 (diff) | |
download | cpython-e7113b6b3dd99b4d05fc81c18e1c2a94fa8e1ebb.zip cpython-e7113b6b3dd99b4d05fc81c18e1c2a94fa8e1ebb.tar.gz cpython-e7113b6b3dd99b4d05fc81c18e1c2a94fa8e1ebb.tar.bz2 |
* 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!]
Diffstat (limited to 'Lib/stdwin')
-rwxr-xr-x | Lib/stdwin/rect.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/stdwin/rect.py b/Lib/stdwin/rect.py index aa5ff44..9bc6342 100755 --- a/Lib/stdwin/rect.py +++ b/Lib/stdwin/rect.py @@ -17,7 +17,8 @@ empty = (0, 0), (0, 0) # 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 @@ def intersect(list): 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 intersect(list): 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 |