[Types-sig] namespaces (was: Changing existing class instances)

Greg Stein gstein@lyra.org
Fri, 21 Jan 2000 04:05:34 -0800 (PST)


Scott did it again.... :-)  Forwarding to types-sig

---------- Forwarded message ----------
Date: Fri, 21 Jan 2000 06:29:09 -0500
From: scott <scott@chronis.pobox.com>
To: Greg Stein <gstein@lyra.org>
Subject: Re: [Types-sig] namespaces (was: Changing existing class instances)

On Fri, Jan 21, 2000 at 03:08:19AM -0800, Greg Stein wrote:
> On Fri, 21 Jan 2000, Tim Peters wrote:
> > [Greg Stein]
> No New Namespaces!  (lather, rinse, repeat)

I agree wholeheartedly for named types.  They just fit into existing
namesapaces, and are 'first class' objects like everything else in
python.

Where this becomes difficult is for un-named types.  The runtime
evironment needs to know the type of an object in order to perform
certain checks, like your ! op or typecase or if datatype(x)...
however you spell it.

But a new namespace seems to be an unclean place to store that info.
Where does that info go?  An extra PyObject * pointer inside of
PyObject *'s?  I don't know.  That info can't really fit into a name
space because there's no name associated with it per se.  It's the
type of a value.

scott