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
5a4e3d8f
Kaydet (Commit)
5a4e3d8f
authored
Nis 27, 2017
tarafından
Jelle Zijlstra
Kaydeden (comit)
Serhiy Storchaka
Nis 27, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-30174: Remove duplicate definition from pickletools (#1301)
There were two almost identical definitions of bytes1.
üst
5bccca58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
29 deletions
+0
-29
pickletools.py
Lib/pickletools.py
+0
-29
No files found.
Lib/pickletools.py
Dosyayı görüntüle @
5a4e3d8f
...
@@ -469,35 +469,6 @@ string4 = ArgumentDescriptor(
...
@@ -469,35 +469,6 @@ string4 = ArgumentDescriptor(
"""
)
"""
)
def
read_bytes1
(
f
):
r"""
>>> import io
>>> read_bytes1(io.BytesIO(b"\x00"))
b''
>>> read_bytes1(io.BytesIO(b"\x03abcdef"))
b'abc'
"""
n
=
read_uint1
(
f
)
assert
n
>=
0
data
=
f
.
read
(
n
)
if
len
(
data
)
==
n
:
return
data
raise
ValueError
(
"expected
%
d bytes in a bytes1, but only
%
d remain"
%
(
n
,
len
(
data
)))
bytes1
=
ArgumentDescriptor
(
name
=
"bytes1"
,
n
=
TAKEN_FROM_ARGUMENT1
,
reader
=
read_bytes1
,
doc
=
"""A counted bytes string.
The first argument is a 1-byte unsigned int giving the number
of bytes in the string, and the second argument is that many
bytes.
"""
)
def
read_bytes1
(
f
):
def
read_bytes1
(
f
):
r"""
r"""
>>> import io
>>> import io
...
...
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