Hi, is it acceptable within typhon to add conditional Python 3.6 code? Something like:
if sys.version_info > (3, 6): import enum class AutoFlag(enum.IntFlag): """Enumerator for bit flags This is a enum.IntFlag subclass that can be used with enum.auto() to automatically assign bitflags. When used with enum.auto(), values wil be enumerated according to 1<<N. """ def _generate_next_value_(name, start, count, last_values): return 1<<count I don't think we want to add a Python3.6 dependency at this time, but I think this piece of utility code could be useful across projects. Both enum.IntFlag and enum.auto() are new in Python 3.6. Gerrit. _______________________________________________ typhon.mi mailing list typhon.mi@lists.uni-hamburg.de https://mailman.rrz.uni-hamburg.de/mailman/listinfo/typhon.mi