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
1255ed62
Kaydet (Commit)
1255ed62
authored
May 04, 2007
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Much more pickling now works.
üst
2e6a4b37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
pickle.py
Lib/pickle.py
+7
-4
No files found.
Lib/pickle.py
Dosyayı görüntüle @
1255ed62
...
...
@@ -308,7 +308,7 @@ class Pickler:
(
t
.
__name__
,
obj
))
# Check for string returned by reduce(), meaning "save as global"
if
i
ni
stance
(
rv
,
basestring
):
if
i
sin
stance
(
rv
,
basestring
):
self
.
save_global
(
obj
,
rv
)
return
...
...
@@ -512,7 +512,8 @@ class Pickler:
else
:
obj
=
obj
.
replace
(
"
\\
"
,
"
\\
u005c"
)
obj
=
obj
.
replace
(
"
\n
"
,
"
\\
u000a"
)
self
.
write
(
UNICODE
+
obj
.
encode
(
'raw-unicode-escape'
)
+
'b
\n
'
)
self
.
write
(
UNICODE
+
bytes
(
obj
.
encode
(
'raw-unicode-escape'
))
+
b
'
\n
'
)
self
.
memoize
(
obj
)
dispatch
[
str
]
=
save_unicode
...
...
@@ -895,7 +896,7 @@ class Unpickler:
dispatch
[
BININT2
[
0
]]
=
load_binint2
def
load_long
(
self
):
self
.
append
(
int
(
s
elf
.
readline
()[:
-
1
]
,
0
))
self
.
append
(
int
(
s
tr
(
self
.
readline
()[:
-
1
])
,
0
))
dispatch
[
LONG
[
0
]]
=
load_long
def
load_long1
(
self
):
...
...
@@ -1081,6 +1082,8 @@ class Unpickler:
def
find_class
(
self
,
module
,
name
):
# Subclasses may override this
module
=
str
(
module
)
name
=
str
(
name
)
__import__
(
module
)
mod
=
sys
.
modules
[
module
]
klass
=
getattr
(
mod
,
name
)
...
...
@@ -1122,7 +1125,7 @@ class Unpickler:
dispatch
[
LONG_BINGET
[
0
]]
=
load_long_binget
def
load_put
(
self
):
self
.
memo
[
s
elf
.
readline
()[:
-
1
]
]
=
self
.
stack
[
-
1
]
self
.
memo
[
s
tr
(
self
.
readline
()[:
-
1
])
]
=
self
.
stack
[
-
1
]
dispatch
[
PUT
[
0
]]
=
load_put
def
load_binput
(
self
):
...
...
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