[Types-sig] const (was: PyDL RFC 0.02)

Greg Stein gstein@lyra.org
Tue, 28 Dec 1999 01:08:29 -0800 (PST)

On Tue, 28 Dec 1999, Paul Prescod wrote:
> Greg Stein wrote:
> > p.s. I'd recommend assignment enforcement over the notion of const; the
> >      former seems to be more easily enforcable at runtime.
> I think we need both. We need to be able to enforce the TYPES of
> assignments and we need to sometimes say that an object is not
> modifiable, for all of the things we currently use tuples, files open
> for read and other read-only objects for.

Um... Are you suggesting that we add a readonly flag to the list and dict
types? Short of that, I'm not sure how you would do "const". IMO, adding a
readonly flag to those types seems wrong.


Greg Stein, http://www.lyra.org/