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
a2a206b9
Kaydet (Commit)
a2a206b9
authored
May 24, 2002
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Mention math.degrees() and math.radians()
Other minor rewrites
üst
cacfc07d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
whatsnew23.tex
Doc/whatsnew/whatsnew23.tex
+24
-12
No files found.
Doc/whatsnew/whatsnew23.tex
Dosyayı görüntüle @
a2a206b9
...
@@ -293,14 +293,13 @@ coefficient that multiplies some other quantity. If the statement is
...
@@ -293,14 +293,13 @@ coefficient that multiplies some other quantity. If the statement is
clearly a truth value.
clearly a truth value.
Python's Booleans were not added for the sake of strict type-checking.
Python's Booleans were not added for the sake of strict type-checking.
A very strict language such as Pascal
A very strict language such as Pascal would also prevent you
% XXX is Pascal the right example here?
performing arithmetic with Booleans, and would require that the
would also prevent you performing arithmetic with Booleans, and would
expression in an
\keyword
{
if
}
statement always evaluate to a Boolean.
require that the expression in an
\keyword
{
if
}
statement always
Python is not this strict, and it never will be. (
\pep
{
285
}
evaluate to a Boolean. Python is not this strict, and it never will
explicitly says so.) So you can still use any expression in an
be. (
\pep
{
285
}
explicitly says this.) So you can still use any
\keyword
{
if
}
, even ones that evaluate to a list or tuple or some
expression in an
\keyword
{
if
}
, even ones that evaluate to a list or
random object, and the Boolean type is a subclass of the
tuple or some random object, and the Boolean type is a subclass of the
\class
{
int
}
class, so arithmetic using a Boolean still works.
\class
{
int
}
class, so arithmetic using a Boolean still works.
\begin{verbatim}
\begin{verbatim}
...
@@ -382,14 +381,20 @@ allocating memory have been consolidated down into two APIs.
...
@@ -382,14 +381,20 @@ allocating memory have been consolidated down into two APIs.
Memory allocated with one API must not be freed with the other API.
Memory allocated with one API must not be freed with the other API.
\begin{itemize}
\begin{itemize}
\item
To allocate and free an undistinguished chunk of memory, use
\item
To allocate and free an undistinguished chunk of memory using
\cfunction
{
PyMem
_
Malloc()
}
,
\cfunction
{
PyMem
_
Realloc()
}
,
Python's allocator, use
\cfunction
{
PyMem
_
Free()
}
, and the other
\cfunction
{
PyMem
_
*
}
\cfunction
{
PyMem
_
Malloc()
}
,
\cfunction
{
PyMem
_
Realloc()
}
, and
functions.
\cfunction
{
PyMem
_
Free()
}
.
\item
In rare cases you may want to avoid using Python's allocator
in order to allocate a chunk of memory;
use
\cfunction
{
PyObject
_
Malloc
}
,
\cfunction
{
PyObject
_
Realloc
}
,
and
\cfunction
{
PyObject
_
Free
}
.
\item
To allocate and free Python objects,
\item
To allocate and free Python objects,
use
\cfunction
{
PyObject
_
New()
}
,
\cfunction
{
PyObject
_
NewVar()
}
, and
use
\cfunction
{
PyObject
_
New()
}
,
\cfunction
{
PyObject
_
NewVar()
}
, and
\cfunction
{
PyObject
_
Del()
}
.
\cfunction
{
PyObject
_
Del()
}
.
\end{itemize}
\end{itemize}
Thanks to lots of work by Tim Peters, pymalloc in 2.3 also provides
Thanks to lots of work by Tim Peters, pymalloc in 2.3 also provides
...
@@ -492,6 +497,13 @@ KeyError: pop(): dictionary is empty
...
@@ -492,6 +497,13 @@ KeyError: pop(): dictionary is empty
>>>
>>>
\end{verbatim}
\end{verbatim}
\item
Two new functions in the
\module
{
math
}
module,
\function
{
degrees(
\var
{
rads
}
)
}
and
\function
{
radians(
\var
{
degs
}
)
}
,
convert between radians and degrees. Other functions in the
\module
{
math
}
module such as
\function
{
math.sin()
}
and
\function
{
math.cos()
}
have always required
input values measured in radians. (Contributed by Raymond Hettinger.)
\item
Two new functions,
\function
{
killpg()
}
and
\function
{
mknod()
}
,
\item
Two new functions,
\function
{
killpg()
}
and
\function
{
mknod()
}
,
were added to the
\module
{
posix
}
module that underlies the
\module
{
os
}
were added to the
\module
{
posix
}
module that underlies the
\module
{
os
}
module.
module.
...
...
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