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
eda80eae
Kaydet (Commit)
eda80eae
authored
Nis 21, 1999
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Correct spelling of length, discovered by Christian Tismer.
üst
a889add5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
bitvec.py
Demo/classes/bitvec.py
+2
-2
No files found.
Demo/classes/bitvec.py
Dosyayı görüntüle @
eda80eae
...
...
@@ -84,7 +84,7 @@ class BitVec:
raise
error
,
'bitvec()
\'
s 2nd parameter must be int'
computed_length
=
_compute_len
(
param
)
if
computed_length
>
length
:
print
'warning: bitvec() value is longer than the leng
ht
indicates, truncating value'
print
'warning: bitvec() value is longer than the leng
th
indicates, truncating value'
self
.
_data
=
self
.
_data
&
\
((
1L
<<
length
)
-
1
)
self
.
_len
=
length
...
...
@@ -178,7 +178,7 @@ class BitVec:
if
length
==
0
or
other
.
_len
==
0
:
return
cmp
(
length
,
other
.
_len
)
if
length
!=
other
.
_len
:
min_leng
ht
=
min
(
length
,
other
.
_len
)
min_leng
th
=
min
(
length
,
other
.
_len
)
return
cmp
(
self
[:
min_length
],
other
[:
min_length
])
or
\
cmp
(
self
[
min_length
:],
other
[
min_length
:])
#the lengths are the same now...
...
...
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