Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

No modification of open() is needed. Just make your enum class a subclass of 
str.

This idea does not look particularly attractive to me, but you can create a 
package on PyPi with your OpenMode class and test how popular it will be.

----------
nosy: +serhiy.storchaka
resolution:  -> rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37918>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to