mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
clarified __index__
This commit is contained in:
@@ -629,7 +629,7 @@ class FieldStorage:
|
||||
<tr><th><a href=http://www.python.org/dev/peps/pep-0357/>PEP 357</a>
|
||||
<td>number as a list index
|
||||
<td><code class=pp>a_list[<var>x</var>]</code>
|
||||
<td><a href=http://www.python.org/doc/3.1/reference/datamodel.html#object.__index__><code>x.<dfn>__index__</dfn>()</code></a>
|
||||
<td><a href=http://www.python.org/doc/3.1/reference/datamodel.html#object.__index__><code>a_list[x.<dfn>__index__</dfn>()]</code></a>
|
||||
</table>
|
||||
|
||||
<h2 id=rich-comparisons>Classes That Can Be Compared</h2>
|
||||
|
||||
Reference in New Issue
Block a user