__instancecheck__ metaclasses, how do they work: why do I get True when I tuple, why doesn't print run?
Rhodri James
rhodri at kynesim.co.uk
Tue Nov 5 06:20:32 EST 2019
On 04/11/2019 22:23, Peter J. Holzer wrote:
> On 2019-11-04 14:54:23 +0000, Rhodri James wrote:
>> On 04/11/2019 14:33, Veek M wrote:
>>> __metaclass__ = whatever; # is python2.x syntax
>>
>> But not Python3: see PEP 3115
>
> Doesn't "X is python2.x syntax" imply "X is not python3 syntax"?
Not necessarily, the OP might have (and apparently was) assuming that it
was also Python3 syntax. Also it gave me an opportunity to point him to
the appropriate PEP. That said, we've reached the limits of my
knowledge here and I'm bowing out of the discussion.
--
Rhodri James *-* Kynesim Ltd
More information about the Python-list
mailing list