On Wed, May 24, 2017 at 7:10 PM, Steve D'Aprano <steve+pyt...@pearwood.info> wrote: > Although I wonder: > > - maybe the enumeration (the class ContentTypes) could have a nicer repr > than > > <enum 'ContentTypes'> > > - maybe you could add functionality to freeze the enumeration so that new > members cannot be added? > > > class ContentTypes(Enum, frozen=True) > class ContentTypes(FrozenEnum)
I'm sure it could be done. But would it really benefit anyone anything? Java has "final" classes, which can't be subclassed; and I haven't heard many people saying "I wish you would declare more of your classes final" or "I wish Python let you declare a class as final". ChrisA -- https://mail.python.org/mailman/listinfo/python-list