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
3294e9d2
Kaydet (Commit)
3294e9d2
authored
Agu 31, 2004
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Update versions and dates; add PEP 328
üst
17952b78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
5 deletions
+41
-5
whatsnew24.tex
Doc/whatsnew/whatsnew24.tex
+41
-5
No files found.
Doc/whatsnew/whatsnew24.tex
Dosyayı görüntüle @
3294e9d2
...
...
@@ -21,15 +21,15 @@
\maketitle
\tableofcontents
This article explains the new features in Python 2.4 alpha
2
, scheduled
for release in
late July 2004
. The final version of Python 2.4 is
expected to be released around
Sept
ember 2004.
This article explains the new features in Python 2.4 alpha
3
, scheduled
for release in
early September
. The final version of Python 2.4 is
expected to be released around
Dec
ember 2004.
Python 2.4 is a medium-sized release. It doesn't introduce as many
changes as the radical Python 2.2, but introduces more features than
the conservative 2.3 release did. The most significant new language
feature
(as of this writing) is the addition of generator expressions;
most other changes are to the standard library.
feature
s (as of this writing) are function decorators and generator
expressions;
most other changes are to the standard library.
This article doesn't attempt to provide a complete specification of
every single new feature, but instead provides a convenient overview.
...
...
@@ -658,6 +658,42 @@ Rexx language.}
\end{seealso}
%======================================================================
\section
{
PEP 328: Multi-line Imports
}
One language change is a small syntactic tweak aimed at making it
easier to import many names from a module. In a
\code
{
from
\var
{
module
}
import
\var
{
names
}}
statement,
\var
{
names
}
is a sequence of names separated by commas. If the sequence is
very long, you can either write multiple imports from the same module,
or you can use backslashes to escape the line endings:
\begin{verbatim}
from SimpleXMLRPCServer import SimpleXMLRPCServer,
\
SimpleXMLRPCRequestHandler,
\
CGIXMLRPCRequestHandler,
\
resolve
_
dotted
_
attribute
\end{verbatim}
The syntactic change simply allows putting the names within
parentheses. Python ignores newlines within a parenthesized
expression, so the backslashes are no longer needed:
\begin{verbatim}
from SimpleXMLRPCServer import (SimpleXMLRPCServer,
SimpleXMLRPCRequestHandler,
CGIXMLRPCRequestHandler,
resolve
_
dotted
_
attribute)
\end{verbatim}
The PEP also proposes that all
\keyword
{
import
}
statements be
absolute imports, with a leading
\samp
{
.
}
character to indicate a
relative import. This part of the PEP is not yet implemented.
\begin{seealso}
\seepep
{
328
}{
Imports: Multi-Line and Absolute/Relative
}{
Written by Aahz. Multi-line imports were implemented by Dima Dorfman.
}
%======================================================================
\section
{
PEP 331: Locale-Independent Float/String Conversions
}
...
...
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