Re: List of methods affected by 'Special method lookup'

2019-01-28 Thread Terry Reedy

On 1/28/2019 11:14 AM, Roberto Martínez wrote:

Hi,

the documentation about Special method lookup

claims:
"For custom classes, implicit invocations of special methods are only
guaranteed to work correctly if defined on an object’s type, not in the
object’s instance dictionary. "

Does this statement holds for every special method mentioned in section 3.3
Special method names
?


You should generally take such statements at face value.  Unless you 
find specific exceptions mentioned elsewhere, 'no guarantee' means just 
that, regardless of how any particular implementation behaves today.

--
Terry Jan Reedy


--
https://mail.python.org/mailman/listinfo/python-list


List of methods affected by 'Special method lookup'

2019-01-28 Thread Roberto Martínez
Hi,

the documentation about Special method lookup

claims:
"For custom classes, implicit invocations of special methods are only
guaranteed to work correctly if defined on an object’s type, not in the
object’s instance dictionary. "

Does this statement holds for every special method mentioned in section 3.3
Special method names
?

Best regards,
Roberto
-- 
https://mail.python.org/mailman/listinfo/python-list