File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -897,10 +897,8 @@ \section{Special method names\label{specialnames}}
897897defining methods with special names. For instance, if a class defines
898898a method named \method {__getitem__()}, and \code {x} is an instance of
899899this class, then \code {x[i]} is equivalent to
900- \code {x.__getitem__(i)}. (The reverse is not true --- if \code {x} is
901- a list object, \code {x.__getitem__(i)} is not equivalent to
902- \code {x[i]}.) Except where mentioned, attempts to execute an
903- operation raise an exception when no appropriate method is defined.
900+ \code {x.__getitem__(i)}. Except where mentioned, attempts to execute
901+ an operation raise an exception when no appropriate method is defined.
904902\withsubitem {(mapping object method)}{\ttindex {__getitem__()}}
905903
906904When implementing a class that emulates any built-in type, it is
You can’t perform that action at this time.
0 commit comments