Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
124eb942
Kaydet (Commit)
124eb942
authored
Eki 26, 1990
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix bug in rect.intersect(): empty rects beyond the first were
ignored instead of making the outcome empty...
üst
e1f069ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
rect.py
Lib/lib-stdwin/rect.py
+9
-8
rect.py
Lib/stdwin/rect.py
+9
-8
No files found.
Lib/lib-stdwin/rect.py
Dosyayı görüntüle @
124eb942
...
@@ -29,14 +29,15 @@ def intersect(list):
...
@@ -29,14 +29,15 @@ def intersect(list):
if
is_empty
(
list
[
0
]):
return
empty
if
is_empty
(
list
[
0
]):
return
empty
(
left
,
top
),
(
right
,
bottom
)
=
list
[
0
]
(
left
,
top
),
(
right
,
bottom
)
=
list
[
0
]
for
rect
in
list
[
1
:]:
for
rect
in
list
[
1
:]:
if
not
is_empty
(
rect
):
if
is_empty
(
rect
):
(
l
,
t
),
(
r
,
b
)
=
rect
return
empty
if
left
<
l
:
left
=
l
(
l
,
t
),
(
r
,
b
)
=
rect
if
top
<
t
:
top
=
t
if
left
<
l
:
left
=
l
if
right
>
r
:
right
=
r
if
top
<
t
:
top
=
t
if
bottom
>
b
:
bottom
=
b
if
right
>
r
:
right
=
r
if
is_empty
((
left
,
top
),
(
right
,
bottom
)):
if
bottom
>
b
:
bottom
=
b
return
empty
if
is_empty
((
left
,
top
),
(
right
,
bottom
)):
return
empty
return
(
left
,
top
),
(
right
,
bottom
)
return
(
left
,
top
),
(
right
,
bottom
)
...
...
Lib/stdwin/rect.py
Dosyayı görüntüle @
124eb942
...
@@ -29,14 +29,15 @@ def intersect(list):
...
@@ -29,14 +29,15 @@ def intersect(list):
if
is_empty
(
list
[
0
]):
return
empty
if
is_empty
(
list
[
0
]):
return
empty
(
left
,
top
),
(
right
,
bottom
)
=
list
[
0
]
(
left
,
top
),
(
right
,
bottom
)
=
list
[
0
]
for
rect
in
list
[
1
:]:
for
rect
in
list
[
1
:]:
if
not
is_empty
(
rect
):
if
is_empty
(
rect
):
(
l
,
t
),
(
r
,
b
)
=
rect
return
empty
if
left
<
l
:
left
=
l
(
l
,
t
),
(
r
,
b
)
=
rect
if
top
<
t
:
top
=
t
if
left
<
l
:
left
=
l
if
right
>
r
:
right
=
r
if
top
<
t
:
top
=
t
if
bottom
>
b
:
bottom
=
b
if
right
>
r
:
right
=
r
if
is_empty
((
left
,
top
),
(
right
,
bottom
)):
if
bottom
>
b
:
bottom
=
b
return
empty
if
is_empty
((
left
,
top
),
(
right
,
bottom
)):
return
empty
return
(
left
,
top
),
(
right
,
bottom
)
return
(
left
,
top
),
(
right
,
bottom
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment