On Wed, Jun 2, 2021 at 8:04 PM Ethan Furman <et...@stoneleaf.us> wrote:
> > Thank you everyone for your ideas! Instead of adding another > single-purpose decorator, I'm toying with the idea of > adding a general purpose decorator that accepts instructions. Something > along the lines of: > ... > Thoughts? > I had a couple comments. First, are these checks going to run at import time? The reason I ask is that, in cases where the enums aren't generated dynamically, it seems like it could make sense for efficiency to have the option of running them instead during tests. The decorator would still be useful because it could tell the test harness what checks to run. My other comment is whether this design would permit checks that take arguments. For example, in the case of the "continuous" check, one might want to be able to say, "this Flag enum should span the first N bits" as opposed to using the highest occurring bit as the N. That way you can be sure you didn't leave off any flags at the end. --Chris >
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/NDNMEHATHT6QHMT7IZLNGJ55TO525ZZZ/ Code of Conduct: http://python.org/psf/codeofconduct/