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
b492fa91
Kaydet (Commit)
b492fa91
authored
Kas 27, 2002
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Mention dict.fromkeys()
Various edits
üst
5ef2b214
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
18 deletions
+29
-18
whatsnew23.tex
Doc/whatsnew/whatsnew23.tex
+29
-18
No files found.
Doc/whatsnew/whatsnew23.tex
Dosyayı görüntüle @
b492fa91
...
...
@@ -615,11 +615,11 @@ characters may be encountered. So far, Python has allowed specifying
the error processing as either ``strict'' (raising
\exception
{
UnicodeError
}
), ``ignore'' (skip the character), or
``replace'' (with question mark), defaulting to ``strict''. It may be
desirable to specify an alternative processing of the error,
e.g. by
desirable to specify an alternative processing of the error,
such as
inserting an XML character reference or HTML entity reference into the
converted string.
Python now has a flexible framework to add
additional
processing
Python now has a flexible framework to add
different
processing
strategies. New error handlers can be added with
\function
{
codecs.register
_
error
}
. Codecs then can access the error
handler with
\function
{
codecs.lookup
_
error
}
. An equivalent C API has
...
...
@@ -631,7 +631,7 @@ replacement string.
Two additional error handlers have been implemented using this
framework: ``backslashreplace'' uses Python backslash quoting to
represent
the unencodable character,
and ``xmlcharrefreplace'' emits
represent
unencodable characters
and ``xmlcharrefreplace'' emits
XML character references.
\begin{seealso}
...
...
@@ -821,7 +821,13 @@ KeyError: pop(): dictionary is empty
>>>
\end{verbatim}
(Patch contributed by Raymond Hettinger.)
There's also a new class method,
\method
{
dict.fromkeys(
\var
{
iterable
}
,
\var
{
value
}
)
}
, that
creates a dictionary with keys taken from the supplied iterator
\var
{
iterable
}
and all values set to
\var
{
value
}
, defaulting to
\code
{
None
}
.
(Patches contributed by Raymond Hettinger.)
\item
The
\keyword
{
assert
}
statement no longer checks the
\code
{__
debug
__}
flag, so you can no longer disable assertions by assigning to
\code
{__
debug
__}
.
...
...
@@ -1283,29 +1289,28 @@ stamps, or if they use the tuple API. If used, the feature should be
activated on an application level instead of trying to enable it on a
per-use basis.
\item
Calling Tcl methods through
\module
{_
tkinter
}
no
w does not
always return strings anymore. Instead, if Tcl returns other objects,
those objects are converted to their Python equivalent, if one exists,
or wrapped with a
\class
{_
tkinter.Tcl
_
Obj
}
object if no Python
e
quivalent e
xists. This behaviour can be controlled through the
\method
{
wantobjects
}
method of
\class
{
tkapp
}
objects.
\item
Calling Tcl methods through
\module
{_
tkinter
}
no
longer
returns only strings. Instead, if Tcl returns other objects those
objects are converted to their Python equivalent, if one exists, or
wrapped with a
\class
{_
tkinter.Tcl
_
Obj
}
object if no Python equivalent
exists. This behaviour can be controlled through the
\method
{
wantobjects
()
}
method of
\class
{
tkapp
}
objects.
When using
_
tkinter through Tkinter.py (i.e. for most
_
tkinter
applications), this feature is always activated. It should not cause
compatibility problems, since Tkinter would always convert string
results to Python types w
ere possible.
When using
\module
{_
tkinter
}
through the
\module
{
Tkinter
}
module (as
most Tkinter applications will), this feature is always activated. It
should not cause compatibility problems, since Tkinter would always
convert string results to Python types wh
ere possible.
If any incompatibilities are found, the old behaviour can be restored
by invoking
by setting the
\member
{
wantobjects
}
variable in the
\module
{
Tkinter
}
module to false before creating the first
\class
{
tkapp
}
object.
\begin{verbatim}
import Tkinter
Tkinter.wantobjects = 0
\end{verbatim}
before creating the first
\class
{
tkapp
}
object.
Please report any such breakage as a bug.
Please report any breakage caused by this change as a bug.
\end{itemize}
...
...
@@ -1652,6 +1657,12 @@ if \var{X} is more than one character long.
integer instead of raising an
\exception
{
OverflowError
}
when a string
or floating
-
point number is too large to fit into an integer.
\item
Calling Tcl methods through
\module
{_
tkinter
}
no longer
returns only strings. Instead, if Tcl returns other objects those
objects are converted to their Python equivalent, if one exists, or
wrapped with a
\class
{_
tkinter.Tcl
_
Obj
}
object if no Python equivalent
exists.
\item
You can no longer disable assertions by assigning to
\code
{__
debug
__}
.
\item
The Distutils
\function
{
setup
()
}
function has gained various new
...
...
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