[Python-Dev] A small step to removing the type/class split
Thu, 26 Oct 2000 12:21:05 +0200
On Wed, Oct 25, 2000 at 02:14:52PM +1300, Greg Ewing wrote:
> Neil Schemenauer <email@example.com>:
> > Those PyInstance_Check() calls should really go away. Instead, the
> > type should be responsible for providing different behavior.
> Yes, that's the crux of the problem, I think.
> Another place where this is a nuisance is where it
> assumes that if x has any tp_as_sequence slots and y
> has any tp_as_number slots, then x*y is a sequence
> replication operation.
This is screwed in more than one way. The logic of which 'type' operation
has precedence isn't even internally consistent. The case of 'x*y' and 'x+y'
check the tp_as_number and tp_as_sequence slots in a *different order*, so
'x*y' can end up a number where 'x+y' ends up a sequence. (Or the other way
'round, I forget. I'm also struggling to catch up on my mail since Apachecon
had little to no connectivity, so I don't feel like checking :)
Thomas Wouters <firstname.lastname@example.org>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!