beginner question: extending python types
Michael Hudson
mwh at python.net
Thu May 16 06:04:53 EDT 2002
Bob Horvath <usenet at horvath.com> writes:
> Jeremy Yallop wrote:
> > * Uwe Mayer
> > | I found Python lacking the type of a "set". i.e. an unordered list.
> > Use a dictionary, with the same value (1) for every key.
> >
>
> Is there any significance to the value 1?
In this context, no. It might be a tad confusing to have something
that was false, so None, 0 and () might be bad choices. But I don't
think there's a good reason.
Cheers,
M.
--
I've reinvented the idea of variables and types as in a
programming language, something I do on every project.
-- Greg Ward, September 1998
More information about the Python-list
mailing list