[Python-checkins] r43522 - python/branches/release24-maint/Doc/ref/ref3.tex (original) (raw)
georg.brandl python-checkins at python.org
Sat Apr 1 09:23:12 CEST 2006
- Previous message: [Python-checkins] r43521 - python/trunk/Doc/ref/ref3.tex
- Next message: [Python-checkins] r43523 - in python/trunk: Doc/lib/libsocket.tex Modules/socketmodule.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: georg.brandl Date: Sat Apr 1 09:23:12 2006 New Revision: 43522
Modified: python/branches/release24-maint/Doc/ref/ref3.tex Log: bug #1462278: small fix in documentation of op vs rop methods (backport from rev. 43521)
Modified: python/branches/release24-maint/Doc/ref/ref3.tex
--- python/branches/release24-maint/Doc/ref/ref3.tex (original) +++ python/branches/release24-maint/Doc/ref/ref3.tex Sat Apr 1 09:23:12 2006 @@ -2005,14 +2005,15 @@ \item Exception to the previous item: if the left operand is an instance of -a built-in type or a new-style class, and the right operand is an -instance of a proper subclass of that type or class, the right -operand's \method{rop()} method is tried \emph{before} the left -operand's \method{op()} method. This is done so that a subclass can -completely override binary operators. Otherwise, the left operand's -op method would always accept the right operand: when an instance -of a given class is expected, an instance of a subclass of that class -is always acceptable. +a built-in type or a new-style class, and the right operand is an instance +of a proper subclass of that type or class and overrides the base's +\method{rop()} method, the right operand's \method{rop()} method +is tried \emph{before} the left operand's \method{op()} method. + +This is done so that a subclass can completely override binary operators. +Otherwise, the left operand's \method{op()} method would always +accept the right operand: when an instance of a given class is expected, +an instance of a subclass of that class is always acceptable. \item
- Previous message: [Python-checkins] r43521 - python/trunk/Doc/ref/ref3.tex
- Next message: [Python-checkins] r43523 - in python/trunk: Doc/lib/libsocket.tex Modules/socketmodule.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]