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
c97a962e
Kaydet (Commit)
c97a962e
authored
Agu 09, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #24824: Signatures of codecs.encode() and codecs.decode() now are
compatible with pydoc.
üst
83ee5a31
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
NEWS
Misc/NEWS
+3
-0
_codecsmodule.c
Modules/_codecsmodule.c
+6
-6
_codecsmodule.c.h
Modules/clinic/_codecsmodule.c.h
+5
-7
No files found.
Misc/NEWS
Dosyayı görüntüle @
c97a962e
...
...
@@ -15,6 +15,9 @@ Core and Builtins
Library
-------
- Issue #24824: Signatures of codecs.encode() and codecs.decode() now are
compatible with pydoc.
- Issue #24634: Importing uuid should not try to load libc on Windows
- Issue #24798: _msvccompiler.py doesn'
t
properly
support
manifests
...
...
Modules/_codecsmodule.c
Dosyayı görüntüle @
c97a962e
...
...
@@ -91,12 +91,12 @@ _codecs_lookup_impl(PyModuleDef *module, const char *encoding)
/*[clinic input]
_codecs.encode
obj: object
encoding: str(c_default="NULL") =
sys.getdefaultencoding()
encoding: str(c_default="NULL") =
"utf-8"
errors: str(c_default="NULL") = "strict"
Encodes obj using the codec registered for encoding.
encoding defaults to the default encoding
. errors may be given to set a
The default encoding is 'utf-8'
. errors may be given to set a
different error handling scheme. Default is 'strict' meaning that encoding
errors raise a ValueError. Other possible values are 'ignore', 'replace'
and 'backslashreplace' as well as any other name registered with
...
...
@@ -106,7 +106,7 @@ codecs.register_error that can handle ValueErrors.
static
PyObject
*
_codecs_encode_impl
(
PyModuleDef
*
module
,
PyObject
*
obj
,
const
char
*
encoding
,
const
char
*
errors
)
/*[clinic end generated code: output=5c073f62249c8d7c input=
2440d769df020a0e
]*/
/*[clinic end generated code: output=5c073f62249c8d7c input=
cd5b685040ff61f0
]*/
{
if
(
encoding
==
NULL
)
encoding
=
PyUnicode_GetDefaultEncoding
();
...
...
@@ -118,12 +118,12 @@ _codecs_encode_impl(PyModuleDef *module, PyObject *obj, const char *encoding,
/*[clinic input]
_codecs.decode
obj: object
encoding: str(c_default="NULL") =
sys.getdefaultencoding()
encoding: str(c_default="NULL") =
"utf-8"
errors: str(c_default="NULL") = "strict"
Decodes obj using the codec registered for encoding.
encoding defaults to the default encoding
. errors may be given to set a
Default encoding is 'utf-8'
. errors may be given to set a
different error handling scheme. Default is 'strict' meaning that encoding
errors raise a ValueError. Other possible values are 'ignore', 'replace'
and 'backslashreplace' as well as any other name registered with
...
...
@@ -133,7 +133,7 @@ codecs.register_error that can handle ValueErrors.
static
PyObject
*
_codecs_decode_impl
(
PyModuleDef
*
module
,
PyObject
*
obj
,
const
char
*
encoding
,
const
char
*
errors
)
/*[clinic end generated code: output=c81cbf6189a7f878 input=
a351e5f5baad1544
]*/
/*[clinic end generated code: output=c81cbf6189a7f878 input=
7702c0cc2fa1add6
]*/
{
if
(
encoding
==
NULL
)
encoding
=
PyUnicode_GetDefaultEncoding
();
...
...
Modules/clinic/_codecsmodule.c.h
Dosyayı görüntüle @
c97a962e
...
...
@@ -42,13 +42,12 @@ exit:
}
PyDoc_STRVAR
(
_codecs_encode__doc__
,
"encode($module, /, obj, encoding=sys.getdefaultencoding(),
\n
"
" errors=
\'
strict
\'
)
\n
"
"encode($module, /, obj, encoding=
\'
utf-8
\'
, errors=
\'
strict
\'
)
\n
"
"--
\n
"
"
\n
"
"Encodes obj using the codec registered for encoding.
\n
"
"
\n
"
"
encoding defaults to the default encoding
. errors may be given to set a
\n
"
"
The default encoding is
\'
utf-8
\'
. errors may be given to set a
\n
"
"different error handling scheme. Default is
\'
strict
\'
meaning that encoding
\n
"
"errors raise a ValueError. Other possible values are
\'
ignore
\'
,
\'
replace
\'\n
"
"and
\'
backslashreplace
\'
as well as any other name registered with
\n
"
...
...
@@ -80,13 +79,12 @@ exit:
}
PyDoc_STRVAR
(
_codecs_decode__doc__
,
"decode($module, /, obj, encoding=sys.getdefaultencoding(),
\n
"
" errors=
\'
strict
\'
)
\n
"
"decode($module, /, obj, encoding=
\'
utf-8
\'
, errors=
\'
strict
\'
)
\n
"
"--
\n
"
"
\n
"
"Decodes obj using the codec registered for encoding.
\n
"
"
\n
"
"
encoding defaults to the default encoding
. errors may be given to set a
\n
"
"
Default encoding is
\'
utf-8
\'
. errors may be given to set a
\n
"
"different error handling scheme. Default is
\'
strict
\'
meaning that encoding
\n
"
"errors raise a ValueError. Other possible values are
\'
ignore
\'
,
\'
replace
\'\n
"
"and
\'
backslashreplace
\'
as well as any other name registered with
\n
"
...
...
@@ -1395,4 +1393,4 @@ exit:
#ifndef _CODECS_CODE_PAGE_ENCODE_METHODDEF
#define _CODECS_CODE_PAGE_ENCODE_METHODDEF
#endif
/* !defined(_CODECS_CODE_PAGE_ENCODE_METHODDEF) */
/*[clinic end generated code: output=
713a4081788da1bc
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
9c9967048027c1c7
input=a9049054013a1b77]*/
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