Enum class with ToString functionality

Ben Finney bignose+hates-spam at benfinney.id.au
Mon Sep 10 20:18:11 EDT 2007


bg_ie at yahoo.com writes:

> But it would be much nicer if I had a function to covert to string
> as part of the TestOutcomes class. How would I implement this?

Others have given ad hoc implementations that may do what you want.

I'd like to know if the Cheeseshop package 'enum' is useful to
you. Any constructive feedback would be appreciated.

    <URL:http://cheeseshop.python.org/pypi/enum/>

-- 
 \       "Remorse: Regret that one waited so long to do it."  -- Henry |
  `\                                                        L. Mencken |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list