[Types-sig] Meta-stuff

Edward Welbourne Edward Welbourne <eddyw@lsl.co.uk>
Thu, 10 Dec 1998 18:38:05 GMT


> ... One could easily be viewed as getattr behavior.  I like to
> think about it as the "Python view" on this discussion. 

Because python defines all its other behaviour in terms of attributes of
the object (see b, below), with those attributes implementing the
behaviour, *all* one ever needs is getattr behaviour.  Touch wood ;^}

> The other issue is dealing with the unification of classes and types.

I prefer to think of it as removing the artificial separation between
the two, rather than unifying them ;->

>> has somebody created a specific list of things to change in the
>> Python object model?

OK, here's a stab at that:

 i) Remove everything artificial from the python object model.

Which mostly comes down to

a) Remove, from attribute lookup, *all* references to the type of the
   object.

with a little bit of

b) Where a type provides functionality that `everyone else' has to
   provide by having the right method to define that functionality,
   expose that functionality (putatively as attributes of the type,
   accessed by objects of that type `in the same way' that an instance
   accesses those of its class) in such a way that (even if the python
   engine internally takes a short-cut) a python program *can access*
   the relevant methods in just the same way as it would if the object
   were an instance.  Thus I would sum a list of integers with
   reduce(Integer.__add__, sequence, 0), and get a type error if any
   entries in the sequence aren't integers.  (Well, maybe a coercion
   error, not sure - what does a type error become in the absence of
   types ?)


Does anyone else find the silences disconcerting ?

	Eddy.