diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-29 04:39:12 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-29 04:39:12 (GMT) |
commit | 3bd844e695c8295c23d64d816bd763543cc9728f (patch) | |
tree | 5c8ae0b247d082498a3e9c02e1eeca9af6a1f0c2 /Doc | |
parent | c4996ba794d9438be8e472ad5f6c3c55fbf751e8 (diff) | |
download | cpython-3bd844e695c8295c23d64d816bd763543cc9728f.zip cpython-3bd844e695c8295c23d64d816bd763543cc9728f.tar.gz cpython-3bd844e695c8295c23d64d816bd763543cc9728f.tar.bz2 |
Get rid of most of the remaining uses of <>. There's still Tools/* thogh.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/email-unpack.py | 2 | ||||
-rw-r--r-- | Doc/lib/libstdtypes.tex | 14 | ||||
-rw-r--r-- | Doc/lib/libstdwin.tex | 4 | ||||
-rw-r--r-- | Doc/ref/ref2.tex | 6 | ||||
-rw-r--r-- | Doc/ref/ref3.tex | 3 | ||||
-rw-r--r-- | Doc/ref/ref5.tex | 9 |
6 files changed, 8 insertions, 30 deletions
diff --git a/Doc/lib/email-unpack.py b/Doc/lib/email-unpack.py index fc05d99..fb03e58 100644 --- a/Doc/lib/email-unpack.py +++ b/Doc/lib/email-unpack.py @@ -37,7 +37,7 @@ Usage: %prog [options] msgfile os.mkdir(opts.directory) except OSError, e: # Ignore directory exists error - if e.errno <> errno.EEXIST: + if e.errno != errno.EEXIST: raise fp = open(msgfile) diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index 95b06f8..e1993aa 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -126,8 +126,7 @@ This table summarizes the comparison operations: \lineiii{>}{strictly greater than}{} \lineiii{>=}{greater than or equal}{} \lineiii{==}{equal}{} - \lineiii{!=}{not equal}{(1)} - \lineiii{<>}{not equal}{(1)} + \lineiii{!=}{not equal} \lineiii{is}{object identity}{} \lineiii{is not}{negated object identity}{} \end{tableiii} @@ -136,17 +135,6 @@ This table summarizes the comparison operations: \opindex{is} \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 compare equal; such objects are ordered consistently but arbitrarily (so that sorting a heterogeneous array yields a consistent result). diff --git a/Doc/lib/libstdwin.tex b/Doc/lib/libstdwin.tex index 84aad2f..f2278e5 100644 --- a/Doc/lib/libstdwin.tex +++ b/Doc/lib/libstdwin.tex @@ -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 supports more than two colors: \begin{verbatim} -if stdwin.fetchcolor('black') <> \ - stdwin.fetchcolor('red') <> \ +if stdwin.fetchcolor('black') != \ + stdwin.fetchcolor('red') != \ stdwin.fetchcolor('white'): print 'color machine' else: diff --git a/Doc/ref/ref2.tex b/Doc/ref/ref2.tex index bad4609..f82d9ce 100644 --- a/Doc/ref/ref2.tex +++ b/Doc/ref/ref2.tex @@ -689,13 +689,9 @@ The following tokens are operators: \begin{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}} diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex index f53dbe3..362d769 100644 --- a/Doc/ref/ref3.tex +++ b/Doc/ref/ref3.tex @@ -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}.__le__(\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}.__ne__(\var{y})}, +\code{\var{x}!=\var{y}} calls \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}.__ge__(\var{y})}. These methods can return any value, but if the comparison operator is diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex index 52bb57f..34a827c 100644 --- a/Doc/ref/ref5.tex +++ b/Doc/ref/ref5.tex @@ -832,7 +832,7 @@ interpretation that is conventional in mathematics: \production{comparison} {\token{or_expr} ( \token{comp_operator} \token{or_expr} )*} \production{comp_operator} - {"<" | ">" | "==" | ">=" | "<=" | "<>" | "!="} + {"<" | ">" | "==" | ">=" | "<=" | "!="} \productioncont{| "is" ["not"] | ["not"] "in"} \end{productionlist} @@ -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 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 \code{!=} compare 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 \lineii{\keyword{in}, \keyword{not} \keyword{in}}{Membership tests} \lineii{\keyword{is}, \keyword{is not}}{Identity tests} \lineii{\code{<}, \code{<=}, \code{>}, \code{>=}, - \code{<>}, \code{!=}, \code{==}} + \code{!=}, \code{==}} {Comparisons} \hline \lineii{\code{|}} {Bitwise OR} |