@@ -532,9 +532,10 @@ \subsection{Sequence Types ---
532532\item [(4)] The slice of \var {s} from \var {i} to \var {j} is defined as
533533 the sequence of items with index \var {k} such that \code {\var {i} <=
534534 \var {k} < \var {j}}. If \var {i} or \var {j} is greater than
535- \code {len(\var {s})}, use \code {len(\var {s})}. If \var {i} is omitted,
536- use \code {0}. If \var {j} is omitted, use \code {len(\var {s})}. If
537- \var {i} is greater than or equal to \var {j}, the slice is empty.
535+ \code {len(\var {s})}, use \code {len(\var {s})}. If \var {i} is omitted
536+ or \code {None}, use \code {0}. If \var {j} is omitted or \code {None},
537+ use \code {len(\var {s})}. If \var {i} is greater than or equal to \var {j},
538+ the slice is empty.
538539
539540\item [(5)] The slice of \var {s} from \var {i} to \var {j} with step
540541 \var {k} is defined as the sequence of items with index
@@ -543,9 +544,9 @@ \subsection{Sequence Types ---
543544 are \code {i}, \code {i+k}, \code {i+2*k}, \code {i+3*k} and so on, stopping when
544545 \var {j} is reached (but never including \var {j}). If \var {i} or \var {j}
545546 is greater than \code {len(\var {s})}, use \code {len(\var {s})}. If
546- \var {i} or \var {j} are omitted then they become `` end'' values
547+ \var {i} or \var {j} are omitted or \code {None}, they become `` end'' values
547548 (which end depends on the sign of \var {k}). Note, \var {k} cannot
548- be zero.
549+ be zero. If \var {k} is \code {None}, it is treated like \code {1}.
549550
550551\item [(6)] If \var {s} and \var {t} are both strings, some Python
551552implementations such as CPython can usually perform an in-place optimization
0 commit comments