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
b7754e12
Kaydet (Commit)
b7754e12
authored
Kas 11, 2004
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix SF bug #1061770: Manual typesets bit-shift operators as guillemet
üst
512f2eee
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
7 deletions
+13
-7
libstdtypes.tex
Doc/lib/libstdtypes.tex
+3
-2
ref5.tex
Doc/ref/ref5.tex
+2
-1
ref6.tex
Doc/ref/ref6.tex
+2
-1
whatsnew20.tex
Doc/whatsnew/whatsnew20.tex
+2
-1
whatsnew23.tex
Doc/whatsnew/whatsnew23.tex
+4
-2
No files found.
Doc/lib/libstdtypes.tex
Dosyayı görüntüle @
b7754e12
...
@@ -316,8 +316,9 @@ priority (operations in the same box have the same priority):
...
@@ -316,8 +316,9 @@ priority (operations in the same box have the same priority):
\lineiii
{
\var
{
x
}
|
\var
{
y
}}{
bitwise
\dfn
{
or
}
of
\var
{
x
}
and
\var
{
y
}}{}
\lineiii
{
\var
{
x
}
|
\var
{
y
}}{
bitwise
\dfn
{
or
}
of
\var
{
x
}
and
\var
{
y
}}{}
\lineiii
{
\var
{
x
}
\^
{}
\var
{
y
}}{
bitwise
\dfn
{
exclusive or
}
of
\var
{
x
}
and
\var
{
y
}}{}
\lineiii
{
\var
{
x
}
\^
{}
\var
{
y
}}{
bitwise
\dfn
{
exclusive or
}
of
\var
{
x
}
and
\var
{
y
}}{}
\lineiii
{
\var
{
x
}
\&
{}
\var
{
y
}}{
bitwise
\dfn
{
and
}
of
\var
{
x
}
and
\var
{
y
}}{}
\lineiii
{
\var
{
x
}
\&
{}
\var
{
y
}}{
bitwise
\dfn
{
and
}
of
\var
{
x
}
and
\var
{
y
}}{}
\lineiii
{
\var
{
x
}
<<
\var
{
n
}}{
\var
{
x
}
shifted left by
\var
{
n
}
bits
}{
(1), (2)
}
% The empty groups below prevent conversion to guillemets.
\lineiii
{
\var
{
x
}
>>
\var
{
n
}}{
\var
{
x
}
shifted right by
\var
{
n
}
bits
}{
(1), (3)
}
\lineiii
{
\var
{
x
}
<
{}
<
\var
{
n
}}{
\var
{
x
}
shifted left by
\var
{
n
}
bits
}{
(1), (2)
}
\lineiii
{
\var
{
x
}
>
{}
>
\var
{
n
}}{
\var
{
x
}
shifted right by
\var
{
n
}
bits
}{
(1), (3)
}
\hline
\hline
\lineiii
{
\~\var
{
x
}}{
the bits of
\var
{
x
}
inverted
}{}
\lineiii
{
\~\var
{
x
}}{
the bits of
\var
{
x
}
inverted
}{}
\end{tableiii}
\end{tableiii}
...
...
Doc/ref/ref5.tex
Dosyayı görüntüle @
b7754e12
...
@@ -753,9 +753,10 @@ The shifting operations have lower priority than the arithmetic
...
@@ -753,9 +753,10 @@ The shifting operations have lower priority than the arithmetic
operations:
operations:
\begin{productionlist}
\begin{productionlist}
% The empty groups below prevent conversion to guillemets.
\production
{
shift
_
expr
}
\production
{
shift
_
expr
}
{
\token
{
a
_
expr
}
{
\token
{
a
_
expr
}
|
\token
{
shift
_
expr
}
( "<
<" | ">
>" )
\token
{
a
_
expr
}}
|
\token
{
shift
_
expr
}
( "<
{}
<" | ">
{}
>" )
\token
{
a
_
expr
}}
\end{productionlist}
\end{productionlist}
These operators accept plain or long integers as arguments. The
These operators accept plain or long integers as arguments. The
...
...
Doc/ref/ref6.tex
Dosyayı görüntüle @
b7754e12
...
@@ -275,7 +275,8 @@ operation and an assignment statement:
...
@@ -275,7 +275,8 @@ operation and an assignment statement:
{
\token
{
target
}
\token
{
augop
}
\token
{
expression
_
list
}}
{
\token
{
target
}
\token
{
augop
}
\token
{
expression
_
list
}}
\production
{
augop
}
\production
{
augop
}
{
"+=" | "-=" | "*=" | "/=" | "
\%
=" | "**="
}
{
"+=" | "-=" | "*=" | "/=" | "
\%
=" | "**="
}
\productioncont
{
| ">>=" | "<<=" | "
\&
=" | "
\textasciicircum
=" | "|="
}
% The empty groups below prevent conversion to guillemets.
\productioncont
{
| ">
{}
>=" | "<
{}
<=" | "
\&
=" | "
\textasciicircum
=" | "|="
}
\end{productionlist}
\end{productionlist}
(See section~
\ref
{
primaries
}
for the syntax definitions for the last
(See section~
\ref
{
primaries
}
for the syntax definitions for the last
...
...
Doc/whatsnew/whatsnew20.tex
Dosyayı görüntüle @
b7754e12
...
@@ -394,9 +394,10 @@ been added to Python 2.0. Augmented assignment operators include
...
@@ -394,9 +394,10 @@ been added to Python 2.0. Augmented assignment operators include
statement
\code
{
a += 2
}
increments the value of the variable
statement
\code
{
a += 2
}
increments the value of the variable
\code
{
a
}
by 2, equivalent to the slightly lengthier
\code
{
a = a + 2
}
.
\code
{
a
}
by 2, equivalent to the slightly lengthier
\code
{
a = a + 2
}
.
% The empty groups below prevent conversion to guillemets.
The full list of supported assignment operators is
\code
{
+=
}
,
The full list of supported assignment operators is
\code
{
+=
}
,
\code
{
-=
}
,
\code
{
*=
}
,
\code
{
/=
}
,
\code
{
\%
=
}
,
\code
{
**=
}
,
\code
{
\&
=
}
,
\code
{
-=
}
,
\code
{
*=
}
,
\code
{
/=
}
,
\code
{
\%
=
}
,
\code
{
**=
}
,
\code
{
\&
=
}
,
\code
{
|=
}
,
\verb
|
^=
|
,
\code
{
>
>=
}
, and
\code
{
<
<=
}
. Python classes can
\code
{
|=
}
,
\verb
|
^=
|
,
\code
{
>
{}
>=
}
, and
\code
{
<
{}
<=
}
. Python classes can
override the augmented assignment operators by defining methods named
override the augmented assignment operators by defining methods named
\method
{__
iadd
__}
,
\method
{__
isub
__}
, etc. For example, the following
\method
{__
iadd
__}
,
\method
{__
isub
__}
, etc. For example, the following
\class
{
Number
}
class stores a number and supports using += to create a
\class
{
Number
}
class stores a number and supports using += to create a
...
...
Doc/whatsnew/whatsnew23.tex
Dosyayı görüntüle @
b7754e12
...
@@ -2344,13 +2344,15 @@ exists.
...
@@ -2344,13 +2344,15 @@ exists.
they're stored as
32
-
bit numbers and result in a negative value, but
they're stored as
32
-
bit numbers and result in a negative value, but
in Python
2
.
4
they'll become positive long integers.
in Python
2
.
4
they'll become positive long integers.
% The empty groups below prevent conversion to guillemets.
There are a few ways to fix this warning. If you really need a
There are a few ways to fix this warning. If you really need a
positive number, just add an
\samp
{
L
}
to the end of the literal. If
positive number, just add an
\samp
{
L
}
to the end of the literal. If
you're trying to get a
32
-
bit integer with low bits set and have
you're trying to get a
32
-
bit integer with low bits set and have
previously used an expression such as
\code
{
~
(
1
<<
31
)
}
, it's probably
previously used an expression such as
\code
{
\textasciitilde
(
1
<
{}
<
31
)
}
,
it's probably
clearest to start with all bits set and clear the desired upper bits.
clearest to start with all bits set and clear the desired upper bits.
For example, to clear just the top bit
(
bit
31
)
, you could write
For example, to clear just the top bit
(
bit
31
)
, you could write
\code
{
0
xffffffffL
{
\&
}{
\textasciitilde
}
(
1
L<<
31
)
}
.
\code
{
0
xffffffffL
{
\&
}{
\textasciitilde
}
(
1
L<
{}
<
31
)
}
.
\item
You can no longer disable assertions by assigning to
\code
{__
debug
__}
.
\item
You can no longer disable assertions by assigning to
\code
{__
debug
__}
.
...
...
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