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
ff87174d
Kaydet (Commit)
ff87174d
authored
Ara 13, 2000
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Get rid of string module and string exceptions.
üst
bc9c1b15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
pickle.py
Lib/pickle.py
+10
-7
No files found.
Lib/pickle.py
Dosyayı görüntüle @
ff87174d
...
...
@@ -27,7 +27,6 @@ __version__ = "$Revision$" # Code version
from
types
import
*
from
copy_reg
import
dispatch_table
,
safe_constructors
import
string
import
marshal
import
sys
import
struct
...
...
@@ -42,6 +41,10 @@ class PickleError(Exception): pass
class
PicklingError
(
PickleError
):
pass
class
UnpicklingError
(
PickleError
):
pass
class
_Stop
(
Exception
):
def
__init__
(
self
,
value
):
self
.
value
=
value
try
:
from
org.python.core
import
PyStringMap
except
ImportError
:
...
...
@@ -514,8 +517,8 @@ class Unpickler:
while
1
:
key
=
read
(
1
)
dispatch
[
key
](
self
)
except
STOP
,
value
:
return
value
except
_Stop
,
stopinst
:
return
stopinst
.
value
def
marker
(
self
):
stack
=
self
.
stack
...
...
@@ -549,7 +552,7 @@ class Unpickler:
dispatch
[
NONE
]
=
load_none
def
load_int
(
self
):
self
.
append
(
string
.
atoi
(
self
.
readline
()[:
-
1
]))
self
.
append
(
int
(
self
.
readline
()[:
-
1
]))
dispatch
[
INT
]
=
load_int
def
load_binint
(
self
):
...
...
@@ -565,11 +568,11 @@ class Unpickler:
dispatch
[
BININT2
]
=
load_binint2
def
load_long
(
self
):
self
.
append
(
string
.
atol
(
self
.
readline
()[:
-
1
],
0
))
self
.
append
(
long
(
self
.
readline
()[:
-
1
],
0
))
dispatch
[
LONG
]
=
load_long
def
load_float
(
self
):
self
.
append
(
string
.
atof
(
self
.
readline
()[:
-
1
]))
self
.
append
(
float
(
self
.
readline
()[:
-
1
]))
dispatch
[
FLOAT
]
=
load_float
def
load_binfloat
(
self
,
unpack
=
struct
.
unpack
):
...
...
@@ -872,7 +875,7 @@ class Unpickler:
def
load_stop
(
self
):
value
=
self
.
stack
[
-
1
]
del
self
.
stack
[
-
1
]
raise
STOP
,
value
raise
_Stop
(
value
)
dispatch
[
STOP
]
=
load_stop
# Helper class for load_inst/load_obj
...
...
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