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
3bd844e6
Kaydet (Commit)
3bd844e6
authored
Agu 29, 2006
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Get rid of most of the remaining uses of <>. There's still Tools/* thogh.
üst
c4996ba7
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
23 additions
and
49 deletions
+23
-49
nfsclient.py
Demo/rpc/nfsclient.py
+1
-1
xdr.py
Demo/rpc/xdr.py
+2
-2
lpwatch.py
Demo/scripts/lpwatch.py
+2
-2
primes.py
Demo/scripts/primes.py
+1
-1
update.py
Demo/scripts/update.py
+1
-1
gopher.py
Demo/sockets/gopher.py
+1
-1
ShellWindow.py
Demo/tkinter/guido/ShellWindow.py
+3
-3
email-unpack.py
Doc/lib/email-unpack.py
+1
-1
libstdtypes.tex
Doc/lib/libstdtypes.tex
+1
-13
libstdwin.tex
Doc/lib/libstdwin.tex
+2
-2
ref2.tex
Doc/ref/ref2.tex
+1
-5
ref3.tex
Doc/ref/ref3.tex
+1
-2
ref5.tex
Doc/ref/ref5.tex
+2
-7
cheatsheet
Misc/cheatsheet
+3
-5
python-mode.el
Misc/python-mode.el
+0
-2
object.c
Objects/object.c
+1
-1
No files found.
Demo/rpc/nfsclient.py
Dosyayı görüntüle @
3bd844e6
...
@@ -163,7 +163,7 @@ class NFSClient(UDPClient):
...
@@ -163,7 +163,7 @@ class NFSClient(UDPClient):
ra
=
(
dir
,
0
,
2000
)
ra
=
(
dir
,
0
,
2000
)
while
1
:
while
1
:
(
status
,
rest
)
=
self
.
Readdir
(
ra
)
(
status
,
rest
)
=
self
.
Readdir
(
ra
)
if
status
<>
NFS_OK
:
if
status
!=
NFS_OK
:
break
break
entries
,
eof
=
rest
entries
,
eof
=
rest
last_cookie
=
None
last_cookie
=
None
...
...
Demo/rpc/xdr.py
Dosyayı görüntüle @
3bd844e6
...
@@ -78,7 +78,7 @@ class Packer:
...
@@ -78,7 +78,7 @@ class Packer:
self
.
pack_uint
(
0
)
self
.
pack_uint
(
0
)
def
pack_farray
(
self
,
n
,
list
,
pack_item
):
def
pack_farray
(
self
,
n
,
list
,
pack_item
):
if
len
(
list
)
<>
n
:
if
len
(
list
)
!=
n
:
raise
ValueError
,
'wrong array size'
raise
ValueError
,
'wrong array size'
for
item
in
list
:
for
item
in
list
:
pack_item
(
item
)
pack_item
(
item
)
...
@@ -183,7 +183,7 @@ class Unpacker:
...
@@ -183,7 +183,7 @@ class Unpacker:
while
1
:
while
1
:
x
=
self
.
unpack_uint
()
x
=
self
.
unpack_uint
()
if
x
==
0
:
break
if
x
==
0
:
break
if
x
<>
1
:
if
x
!=
1
:
raise
RuntimeError
,
'0 or 1 expected, got
%
r'
%
(
x
,
)
raise
RuntimeError
,
'0 or 1 expected, got
%
r'
%
(
x
,
)
item
=
unpack_item
()
item
=
unpack_item
()
list
.
append
(
item
)
list
.
append
(
item
)
...
...
Demo/scripts/lpwatch.py
Dosyayı görüntüle @
3bd844e6
...
@@ -74,7 +74,7 @@ def makestatus(name, thisuser):
...
@@ -74,7 +74,7 @@ def makestatus(name, thisuser):
ubytes
=
ubytes
+
bytes
ubytes
=
ubytes
+
bytes
users
[
user
]
=
ujobs
,
ubytes
users
[
user
]
=
ujobs
,
ubytes
else
:
else
:
if
fields
and
fields
[
0
]
<>
'Rank'
:
if
fields
and
fields
[
0
]
!=
'Rank'
:
line
=
string
.
strip
(
line
)
line
=
string
.
strip
(
line
)
if
line
==
'no entries'
:
if
line
==
'no entries'
:
line
=
name
+
': idle'
line
=
name
+
': idle'
...
@@ -84,7 +84,7 @@ def makestatus(name, thisuser):
...
@@ -84,7 +84,7 @@ def makestatus(name, thisuser):
#
#
if
totaljobs
:
if
totaljobs
:
line
=
'
%
d K'
%
((
totalbytes
+
1023
)
/
1024
)
line
=
'
%
d K'
%
((
totalbytes
+
1023
)
/
1024
)
if
totaljobs
<>
len
(
users
):
if
totaljobs
!=
len
(
users
):
line
=
line
+
' (
%
d jobs)'
%
totaljobs
line
=
line
+
' (
%
d jobs)'
%
totaljobs
if
len
(
users
)
==
1
:
if
len
(
users
)
==
1
:
line
=
line
+
' for
%
s'
%
(
users
.
keys
()[
0
],)
line
=
line
+
' for
%
s'
%
(
users
.
keys
()[
0
],)
...
...
Demo/scripts/primes.py
Dosyayı görüntüle @
3bd844e6
...
@@ -18,7 +18,7 @@ def primes(min, max):
...
@@ -18,7 +18,7 @@ def primes(min, max):
while
i
<=
max
:
while
i
<=
max
:
for
p
in
primes
:
for
p
in
primes
:
if
i
%
p
==
0
or
p
*
p
>
i
:
break
if
i
%
p
==
0
or
p
*
p
>
i
:
break
if
i
%
p
<>
0
:
if
i
%
p
!=
0
:
primes
.
append
(
i
)
primes
.
append
(
i
)
if
i
>=
min
:
print
i
if
i
>=
min
:
print
i
i
=
i
+
2
i
=
i
+
2
...
...
Demo/scripts/update.py
Dosyayı görüntüle @
3bd844e6
...
@@ -83,7 +83,7 @@ def main():
...
@@ -83,7 +83,7 @@ def main():
print
'Funny line:'
,
line
,
print
'Funny line:'
,
line
,
continue
continue
filename
,
lineno
=
prog
.
group
(
1
,
2
)
filename
,
lineno
=
prog
.
group
(
1
,
2
)
if
not
curfile
or
filename
<>
curfile
.
filename
:
if
not
curfile
or
filename
!=
curfile
.
filename
:
if
curfile
:
curfile
.
finish
()
if
curfile
:
curfile
.
finish
()
curfile
=
FileObj
(
filename
)
curfile
=
FileObj
(
filename
)
curfile
.
process
(
lineno
,
line
[
n
:])
curfile
.
process
(
lineno
,
line
[
n
:])
...
...
Demo/sockets/gopher.py
Dosyayı görüntüle @
3bd844e6
...
@@ -246,7 +246,7 @@ def browse_search(selector, host, port):
...
@@ -246,7 +246,7 @@ def browse_search(selector, host, port):
def
browse_telnet
(
selector
,
host
,
port
):
def
browse_telnet
(
selector
,
host
,
port
):
if
selector
:
if
selector
:
print
'Log in as'
,
repr
(
selector
)
print
'Log in as'
,
repr
(
selector
)
if
type
(
port
)
<>
type
(
''
):
if
type
(
port
)
!=
type
(
''
):
port
=
repr
(
port
)
port
=
repr
(
port
)
sts
=
os
.
system
(
'set -x; exec telnet '
+
host
+
' '
+
port
)
sts
=
os
.
system
(
'set -x; exec telnet '
+
host
+
' '
+
port
)
if
sts
:
if
sts
:
...
...
Demo/tkinter/guido/ShellWindow.py
Dosyayı görüntüle @
3bd844e6
...
@@ -115,11 +115,11 @@ def spawn(prog, args):
...
@@ -115,11 +115,11 @@ def spawn(prog, args):
os
.
close
(
i
)
os
.
close
(
i
)
except
os
.
error
:
except
os
.
error
:
pass
pass
if
os
.
dup
(
p2cread
)
<>
0
:
if
os
.
dup
(
p2cread
)
!=
0
:
sys
.
stderr
.
write
(
'popen2: bad read dup
\n
'
)
sys
.
stderr
.
write
(
'popen2: bad read dup
\n
'
)
if
os
.
dup
(
c2pwrite
)
<>
1
:
if
os
.
dup
(
c2pwrite
)
!=
1
:
sys
.
stderr
.
write
(
'popen2: bad write dup
\n
'
)
sys
.
stderr
.
write
(
'popen2: bad write dup
\n
'
)
if
os
.
dup
(
c2pwrite
)
<>
2
:
if
os
.
dup
(
c2pwrite
)
!=
2
:
sys
.
stderr
.
write
(
'popen2: bad write dup
\n
'
)
sys
.
stderr
.
write
(
'popen2: bad write dup
\n
'
)
for
i
in
range
(
3
,
MAXFD
):
for
i
in
range
(
3
,
MAXFD
):
try
:
try
:
...
...
Doc/lib/email-unpack.py
Dosyayı görüntüle @
3bd844e6
...
@@ -37,7 +37,7 @@ Usage: %prog [options] msgfile
...
@@ -37,7 +37,7 @@ Usage: %prog [options] msgfile
os
.
mkdir
(
opts
.
directory
)
os
.
mkdir
(
opts
.
directory
)
except
OSError
,
e
:
except
OSError
,
e
:
# Ignore directory exists error
# Ignore directory exists error
if
e
.
errno
<>
errno
.
EEXIST
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
raise
fp
=
open
(
msgfile
)
fp
=
open
(
msgfile
)
...
...
Doc/lib/libstdtypes.tex
Dosyayı görüntüle @
3bd844e6
...
@@ -126,8 +126,7 @@ This table summarizes the comparison operations:
...
@@ -126,8 +126,7 @@ This table summarizes the comparison operations:
\lineiii
{
>
}{
strictly greater than
}{}
\lineiii
{
>
}{
strictly greater than
}{}
\lineiii
{
>=
}{
greater than or equal
}{}
\lineiii
{
>=
}{
greater than or equal
}{}
\lineiii
{
==
}{
equal
}{}
\lineiii
{
==
}{
equal
}{}
\lineiii
{
!=
}{
not equal
}{
(1)
}
\lineiii
{
!=
}{
not equal
}
\lineiii
{
<>
}{
not equal
}{
(1)
}
\lineiii
{
is
}{
object identity
}{}
\lineiii
{
is
}{
object identity
}{}
\lineiii
{
is not
}{
negated object identity
}{}
\lineiii
{
is not
}{
negated object identity
}{}
\end{tableiii}
\end{tableiii}
...
@@ -136,17 +135,6 @@ This table summarizes the comparison operations:
...
@@ -136,17 +135,6 @@ This table summarizes the comparison operations:
\opindex
{
is
}
\opindex
{
is
}
\opindex
{
is not
}
\opindex
{
is not
}
\noindent
Notes:
\begin{description}
\item
[(1)]
\code
{
<>
}
and
\code
{
!=
}
are alternate spellings for the same operator.
\code
{
!=
}
is the preferred spelling;
\code
{
<>
}
is obsolescent.
\end{description}
Objects of different types, except different numeric types and different string types, never
Objects of different types, except different numeric types and different string types, never
compare equal; such objects are ordered consistently but arbitrarily
compare equal; such objects are ordered consistently but arbitrarily
(so that sorting a heterogeneous array yields a consistent result).
(so that sorting a heterogeneous array yields a consistent result).
...
...
Doc/lib/libstdwin.tex
Dosyayı görüntüle @
3bd844e6
...
@@ -123,8 +123,8 @@ Return the default foreground color for unknown color names.
...
@@ -123,8 +123,8 @@ Return the default foreground color for unknown color names.
Hint: the following code tests whether you are on a machine that
Hint: the following code tests whether you are on a machine that
supports more than two colors:
supports more than two colors:
\begin{verbatim}
\begin{verbatim}
if stdwin.fetchcolor('black')
<>
\
if stdwin.fetchcolor('black')
!=
\
stdwin.fetchcolor('red')
<>
\
stdwin.fetchcolor('red')
!=
\
stdwin.fetchcolor('white'):
stdwin.fetchcolor('white'):
print 'color machine'
print 'color machine'
else:
else:
...
...
Doc/ref/ref2.tex
Dosyayı görüntüle @
3bd844e6
...
@@ -689,13 +689,9 @@ The following tokens are operators:
...
@@ -689,13 +689,9 @@ The following tokens are operators:
\begin{verbatim}
\begin{verbatim}
+ - * ** / //
%
+ - * ** / //
%
<< >>
&
|
^
~
<< >>
&
|
^
~
< > <= >= == !=
<>
< > <= >= == !=
\end{verbatim}
\end{verbatim}
The comparison operators
\code
{
<>
}
and
\code
{
!=
}
are alternate
spellings of the same operator.
\code
{
!=
}
is the preferred spelling;
\code
{
<>
}
is obsolescent.
\section
{
Delimiters
\label
{
delimiters
}}
\section
{
Delimiters
\label
{
delimiters
}}
...
...
Doc/ref/ref3.tex
Dosyayı görüntüle @
3bd844e6
...
@@ -1243,8 +1243,7 @@ follows:
...
@@ -1243,8 +1243,7 @@ follows:
\code
{
\var
{
x
}
<
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
lt
__
(
\var
{
y
}
)
}
,
\code
{
\var
{
x
}
<
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
lt
__
(
\var
{
y
}
)
}
,
\code
{
\var
{
x
}
<=
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
le
__
(
\var
{
y
}
)
}
,
\code
{
\var
{
x
}
<=
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
le
__
(
\var
{
y
}
)
}
,
\code
{
\var
{
x
}
==
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
eq
__
(
\var
{
y
}
)
}
,
\code
{
\var
{
x
}
==
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
eq
__
(
\var
{
y
}
)
}
,
\code
{
\var
{
x
}
!=
\var
{
y
}}
and
\code
{
\var
{
x
}
<>
\var
{
y
}}
call
\code
{
\var
{
x
}
!=
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
ne
__
(
\var
{
y
}
)
}
,
\code
{
\var
{
x
}
.
__
ne
__
(
\var
{
y
}
)
}
,
\code
{
\var
{
x
}
>
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
gt
__
(
\var
{
y
}
)
}
, and
\code
{
\var
{
x
}
>
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
gt
__
(
\var
{
y
}
)
}
, and
\code
{
\var
{
x
}
>=
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
ge
__
(
\var
{
y
}
)
}
.
\code
{
\var
{
x
}
>=
\var
{
y
}}
calls
\code
{
\var
{
x
}
.
__
ge
__
(
\var
{
y
}
)
}
.
These methods can return any value, but if the comparison operator is
These methods can return any value, but if the comparison operator is
...
...
Doc/ref/ref5.tex
Dosyayı görüntüle @
3bd844e6
...
@@ -832,7 +832,7 @@ interpretation that is conventional in mathematics:
...
@@ -832,7 +832,7 @@ interpretation that is conventional in mathematics:
\production
{
comparison
}
\production
{
comparison
}
{
\token
{
or
_
expr
}
(
\token
{
comp
_
operator
}
\token
{
or
_
expr
}
)*
}
{
\token
{
or
_
expr
}
(
\token
{
comp
_
operator
}
\token
{
or
_
expr
}
)*
}
\production
{
comp
_
operator
}
\production
{
comp
_
operator
}
{
"<" | ">" | "==" | ">=" | "<=" | "
<>" | "
!="
}
{
"<" | ">" | "==" | ">=" | "<=" | "!="
}
\productioncont
{
| "is" ["not"] | ["not"] "in"
}
\productioncont
{
| "is" ["not"] | ["not"] "in"
}
\end{productionlist}
\end{productionlist}
...
@@ -854,11 +854,6 @@ Note that \var{a opa b opb c} doesn't imply any kind of comparison
...
@@ -854,11 +854,6 @@ Note that \var{a opa b opb c} doesn't imply any kind of comparison
between
\var
{
a
}
and
\var
{
c
}
, so that, e.g.,
\code
{
x < y > z
}
is
between
\var
{
a
}
and
\var
{
c
}
, so that, e.g.,
\code
{
x < y > z
}
is
perfectly legal (though perhaps not pretty).
perfectly legal (though perhaps not pretty).
The forms
\code
{
<>
}
and
\code
{
!=
}
are equivalent; for consistency with
C,
\code
{
!=
}
is preferred; where
\code
{
!=
}
is mentioned below
\code
{
<>
}
is also accepted. The
\code
{
<>
}
spelling is considered
obsolescent.
The operators
\code
{
<
}
,
\code
{
>
}
,
\code
{
==
}
,
\code
{
>=
}
,
\code
{
<=
}
, and
The operators
\code
{
<
}
,
\code
{
>
}
,
\code
{
==
}
,
\code
{
>=
}
,
\code
{
<=
}
, and
\code
{
!=
}
compare
\code
{
!=
}
compare
the values of two objects. The objects need not have the same type.
the values of two objects. The objects need not have the same type.
...
@@ -1111,7 +1106,7 @@ have the same precedence and chain from left to right --- see section
...
@@ -1111,7 +1106,7 @@ have the same precedence and chain from left to right --- see section
\lineii
{
\keyword
{
in
}
,
\keyword
{
not
}
\keyword
{
in
}}{
Membership tests
}
\lineii
{
\keyword
{
in
}
,
\keyword
{
not
}
\keyword
{
in
}}{
Membership tests
}
\lineii
{
\keyword
{
is
}
,
\keyword
{
is not
}}{
Identity tests
}
\lineii
{
\keyword
{
is
}
,
\keyword
{
is not
}}{
Identity tests
}
\lineii
{
\code
{
<
}
,
\code
{
<=
}
,
\code
{
>
}
,
\code
{
>=
}
,
\lineii
{
\code
{
<
}
,
\code
{
<=
}
,
\code
{
>
}
,
\code
{
>=
}
,
\code
{
<>
}
,
\code
{
!=
}
,
\code
{
==
}}
\code
{
!=
}
,
\code
{
==
}}
{
Comparisons
}
{
Comparisons
}
\hline
\hline
\lineii
{
\code
{
|
}}
{
Bitwise OR
}
\lineii
{
\code
{
|
}}
{
Bitwise OR
}
...
...
Misc/cheatsheet
Dosyayı görüntüle @
3bd844e6
...
@@ -215,7 +215,6 @@ Highest Operator Comment
...
@@ -215,7 +215,6 @@ Highest Operator Comment
x^y Bitwise exclusive or
x^y Bitwise exclusive or
x|y Bitwise or
x|y Bitwise or
x<y x<=y x>y x>=y x==y x!=y Comparison,
x<y x<=y x>y x>=y x==y x!=y Comparison,
x<>y identity,
x is y x is not y membership
x is y x is not y membership
x in s x not in s
x in s x not in s
not x boolean negation
not x boolean negation
...
@@ -241,7 +240,7 @@ Comparison Meaning Notes
...
@@ -241,7 +240,7 @@ Comparison Meaning Notes
> strictly greater than
> strictly greater than
>= greater than or equal to
>= greater than or equal to
== equal to
== equal to
!=
or <>
not equal to
!=
not equal to
is object identity (2)
is object identity (2)
is not negated object identity (2)
is not negated object identity (2)
...
@@ -1009,9 +1008,8 @@ reload(module) after fixing it. If module was syntacticallycorrect but had
...
@@ -1009,9 +1008,8 @@ reload(module) after fixing it. If module was syntacticallycorrect but had
an error in initialization, mustimport it one more time
an error in initialization, mustimport it one more time
before calling reload().
before calling reload().
Returns a string containing a printable and if possible
Returns a string containing a printable and if possible
repr(object) evaluable representation of an object. <=> `object`
repr(object) evaluable representation of an object.
(usingbackquotes). Class redefinissable (__repr__). See
Class redefinable (__repr__). See also str().
also str()
round(x, n=0) Returns the floating point value x rounded to n digitsafter
round(x, n=0) Returns the floating point value x rounded to n digitsafter
the decimal point.
the decimal point.
setattr(object, This is the counterpart of getattr().setattr(o, 'foobar',
setattr(object, This is the counterpart of getattr().setattr(o, 'foobar',
...
...
Misc/python-mode.el
Dosyayı görüntüle @
3bd844e6
...
@@ -690,8 +690,6 @@ prospect as debugging continues.")
...
@@ -690,8 +690,6 @@ prospect as debugging continues.")
;; Both single quote and double quote are string delimiters
;; Both single quote and double quote are string delimiters
(modify-syntax-entry ?\' "\"" py-mode-syntax-table)
(modify-syntax-entry ?\' "\"" py-mode-syntax-table)
(modify-syntax-entry ?\" "\"" py-mode-syntax-table)
(modify-syntax-entry ?\" "\"" py-mode-syntax-table)
;; backquote is open and close paren
(modify-syntax-entry ?\` "$" py-mode-syntax-table)
;; comment delimiters
;; comment delimiters
(modify-syntax-entry ?\# "<" py-mode-syntax-table)
(modify-syntax-entry ?\# "<" py-mode-syntax-table)
(modify-syntax-entry ?\n ">" py-mode-syntax-table)
(modify-syntax-entry ?\n ">" py-mode-syntax-table)
...
...
Objects/object.c
Dosyayı görüntüle @
3bd844e6
...
@@ -591,7 +591,7 @@ do_compare(PyObject *v, PyObject *w)
...
@@ -591,7 +591,7 @@ do_compare(PyObject *v, PyObject *w)
/* Give up */
/* Give up */
PyErr_Format
(
PyExc_TypeError
,
PyErr_Format
(
PyExc_TypeError
,
"unorderable types: '%.100s'
<>
'%.100s'"
,
"unorderable types: '%.100s'
!=
'%.100s'"
,
v
->
ob_type
->
tp_name
,
v
->
ob_type
->
tp_name
,
w
->
ob_type
->
tp_name
);
w
->
ob_type
->
tp_name
);
return
-
1
;
return
-
1
;
...
...
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