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
90e9a79a
Kaydet (Commit)
90e9a79a
authored
Agu 15, 2002
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add 'in' change
Revise sentence Add two reminders
üst
fdb86483
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
whatsnew23.tex
Doc/whatsnew/whatsnew23.tex
+29
-3
No files found.
Doc/whatsnew/whatsnew23.tex
Dosyayı görüntüle @
90e9a79a
...
...
@@ -15,6 +15,10 @@
% MacOS framework-related changes (section of its own, probably)
%
% New sorting code
%
% Karatsuba multiplication for long ints (#560379)
%
% xreadlines obsolete; files are their own iterator
%\section{Introduction \label{intro}}
...
...
@@ -480,9 +484,11 @@ class FakeSeq:
return self.calc
_
item(i)
\end{verbatim}
From this example you can also see that the builtin ``
\var
{
slice
}
''
object is now the type of slice objects, not a function (so is now
consistent with
\var
{
int
}
,
\var
{
str
}
, etc from 2.2).
From this example you can also see that the builtin ``
\class
{
slice
}
''
object is now the type object for the slice type, and is no longer a
function. This is consistent with Python 2.2, where
\class
{
int
}
,
\class
{
str
}
, etc., underwent the same change.
%======================================================================
\section
{
Other Language Changes
}
...
...
@@ -494,6 +500,26 @@ language.
\item
The
\keyword
{
yield
}
statement is now always a keyword, as
described in section~
\ref
{
section-generators
}
of this document.
\item
The
\code
{
in
}
operator now works differently for strings.
Previously, when evaluating
\code
{
\var
{
X
}
in
\var
{
Y
}}
where
\var
{
X
}
and
\var
{
Y
}
are strings,
\var
{
X
}
could only be a single character.
That's now changed;
\var
{
X
}
can be a string of any length, and
\code
{
\var
{
X
}
in
\var
{
Y
}}
will return
\constant
{
True
}
if
\var
{
X
}
is a
substring of
\var
{
Y
}
. If
\var
{
X
}
is the empty string, the result is
always
\constant
{
True
}
.
\begin{verbatim}
>>> 'ab' in 'abcd'
True
>>> 'ad' in 'abcd'
False
>>> '' in 'abcd'
True
\end{verbatim}
Note that this doesn't tell you where the substring starts; the
\method
{
find()
}
method is still necessary to figure that out.
\item
A new built-in function
\function
{
enumerate()
}
was added, as described in section~
\ref
{
section-enumerate
}
of this
document.
...
...
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