[C++-sig] Need help on enum--a concrete example
Peter.Bienstman at rug.ac.be
Tue Sep 10 21:27:57 CEST 2002
-----BEGIN PGP SIGNED MESSAGE-----
On Tuesday 10 September 2002 08:04, David Abrahams wrote:
> From: "Peter Bienstman" <Peter.Bienstman at rug.ac.be>
> Small question: is there a trick to pollute the global namespace with the
> constants, such that one can write just 'red' in Python, rather than
> I know it's less clean, but it's easier for the user and ties in better
> Python's weak typing.
> It doesn't tie in well with Python's "strong namespaceing".
> There is no global namespace in Python. Do you mean that you'd like the
> constants to be in the enclosing scope?
Yep, point taken, that's what I mean.
For backwards compatibility and ease of use, I'd like my users to be able to
Is this possible? I'm perfectly fine with being burnt on the stake for being a
namespace heretic ;-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig