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
da084704
Unverified
Kaydet (Commit)
da084704
authored
Mar 27, 2019
tarafından
Serhiy Storchaka
Kaydeden (comit)
GitHub
Mar 27, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-36431: Use PEP 448 dict unpacking for merging two dicts. (GH-12553)
üst
384b81d9
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
29 deletions
+14
-29
functools.py
Lib/functools.py
+7
-14
rpc.py
Lib/idlelib/rpc.py
+1
-2
pdb.py
Lib/pdb.py
+2
-4
request.py
Lib/urllib/request.py
+1
-2
ElementTree.py
Lib/xml/etree/ElementTree.py
+2
-5
saxutils.py
Lib/xml/sax/saxutils.py
+1
-2
No files found.
Lib/functools.py
Dosyayı görüntüle @
da084704
...
...
@@ -285,10 +285,7 @@ class partial:
if
hasattr
(
func
,
"func"
):
args
=
func
.
args
+
args
tmpkw
=
func
.
keywords
.
copy
()
tmpkw
.
update
(
keywords
)
keywords
=
tmpkw
del
tmpkw
keywords
=
{
**
func
.
keywords
,
**
keywords
}
func
=
func
.
func
self
=
super
(
partial
,
cls
)
.
__new__
(
cls
)
...
...
@@ -302,9 +299,8 @@ class partial:
if
not
args
:
raise
TypeError
(
"descriptor '__call__' of partial needs an argument"
)
self
,
*
args
=
args
newkeywords
=
self
.
keywords
.
copy
()
newkeywords
.
update
(
keywords
)
return
self
.
func
(
*
self
.
args
,
*
args
,
**
newkeywords
)
keywords
=
{
**
self
.
keywords
,
**
keywords
}
return
self
.
func
(
*
self
.
args
,
*
args
,
**
keywords
)
@recursive_repr
()
def
__repr__
(
self
):
...
...
@@ -371,8 +367,7 @@ class partialmethod(object):
# it's also more efficient since only one function will be called
self
.
func
=
func
.
func
self
.
args
=
func
.
args
+
args
self
.
keywords
=
func
.
keywords
.
copy
()
self
.
keywords
.
update
(
keywords
)
self
.
keywords
=
{
**
func
.
keywords
,
**
keywords
}
else
:
self
.
func
=
func
self
.
args
=
args
...
...
@@ -391,11 +386,9 @@ class partialmethod(object):
def
_make_unbound_method
(
self
):
def
_method
(
*
args
,
**
keywords
):
call_keywords
=
self
.
keywords
.
copy
()
call_keywords
.
update
(
keywords
)
cls_or_self
,
*
rest
=
args
call_args
=
(
cls_or_self
,)
+
self
.
args
+
tuple
(
rest
)
return
self
.
func
(
*
call_args
,
**
call_keywords
)
cls_or_self
,
*
args
=
args
keywords
=
{
**
self
.
keywords
,
**
keywords
}
return
self
.
func
(
cls_or_self
,
*
self
.
args
,
*
args
,
**
keywords
)
_method
.
__isabstractmethod__
=
self
.
__isabstractmethod__
_method
.
_partialmethod
=
self
return
_method
...
...
Lib/idlelib/rpc.py
Dosyayı görüntüle @
da084704
...
...
@@ -64,8 +64,7 @@ def dumps(obj, protocol=None):
class
CodePickler
(
pickle
.
Pickler
):
dispatch_table
=
{
types
.
CodeType
:
pickle_code
}
dispatch_table
.
update
(
copyreg
.
dispatch_table
)
dispatch_table
=
{
types
.
CodeType
:
pickle_code
,
**
copyreg
.
dispatch_table
}
BUFSIZE
=
8
*
1024
...
...
Lib/pdb.py
Dosyayı görüntüle @
da084704
...
...
@@ -491,8 +491,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
# Collect globals and locals. It is usually not really sensible to also
# complete builtins, and they clutter the namespace quite heavily, so we
# leave them out.
ns
=
self
.
curframe
.
f_globals
.
copy
()
ns
.
update
(
self
.
curframe_locals
)
ns
=
{
**
self
.
curframe
.
f_globals
,
**
self
.
curframe_locals
}
if
'.'
in
text
:
# Walk an attribute chain up to the last part, similar to what
# rlcompleter does. This will bail if any of the parts are not
...
...
@@ -1377,8 +1376,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
Start an interactive interpreter whose global namespace
contains all the (global and local) names found in the current scope.
"""
ns
=
self
.
curframe
.
f_globals
.
copy
()
ns
.
update
(
self
.
curframe_locals
)
ns
=
{
**
self
.
curframe
.
f_globals
,
**
self
.
curframe_locals
}
code
.
interact
(
"*interactive*"
,
local
=
ns
)
def
do_alias
(
self
,
arg
):
...
...
Lib/urllib/request.py
Dosyayı görüntüle @
da084704
...
...
@@ -426,8 +426,7 @@ class Request:
self
.
unredirected_hdrs
.
pop
(
header_name
,
None
)
def
header_items
(
self
):
hdrs
=
self
.
unredirected_hdrs
.
copy
()
hdrs
.
update
(
self
.
headers
)
hdrs
=
{
**
self
.
unredirected_hdrs
,
**
self
.
headers
}
return
list
(
hdrs
.
items
())
class
OpenerDirector
:
...
...
Lib/xml/etree/ElementTree.py
Dosyayı görüntüle @
da084704
...
...
@@ -169,10 +169,8 @@ class Element:
if
not
isinstance
(
attrib
,
dict
):
raise
TypeError
(
"attrib must be dict, not
%
s"
%
(
attrib
.
__class__
.
__name__
,))
attrib
=
attrib
.
copy
()
attrib
.
update
(
extra
)
self
.
tag
=
tag
self
.
attrib
=
attrib
self
.
attrib
=
{
**
attrib
,
**
extra
}
self
.
_children
=
[]
def
__repr__
(
self
):
...
...
@@ -451,8 +449,7 @@ def SubElement(parent, tag, attrib={}, **extra):
additional attributes given as keyword arguments.
"""
attrib
=
attrib
.
copy
()
attrib
.
update
(
extra
)
attrib
=
{
**
attrib
,
**
extra
}
element
=
parent
.
makeelement
(
tag
,
attrib
)
parent
.
append
(
element
)
return
element
...
...
Lib/xml/sax/saxutils.py
Dosyayı görüntüle @
da084704
...
...
@@ -56,8 +56,7 @@ def quoteattr(data, entities={}):
the optional entities parameter. The keys and values must all be
strings; each key will be replaced with its corresponding value.
"""
entities
=
entities
.
copy
()
entities
.
update
({
'
\n
'
:
' '
,
'
\r
'
:
' '
,
'
\t
'
:
'	'
})
entities
=
{
**
entities
,
'
\n
'
:
' '
,
'
\r
'
:
' '
,
'
\t
'
:
'	'
}
data
=
escape
(
data
,
entities
)
if
'"'
in
data
:
if
"'"
in
data
:
...
...
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