Message382809
Okay, you convinced me. I would ask two things, though:
- use vars() instead of locals()
- split the one-liner ;)
class Foo(Enum):
vars().update({
k: v
for k, v in foo_defines.items()
if k.startswith('FOO_')
})
def some_method(self):
# do something |
|
Date |
User |
Action |
Args |
2020-12-09 22:31:04 | ethan.furman | set | recipients:
+ ethan.furman, Antony.Lee, josh.r, bup |
2020-12-09 22:31:04 | ethan.furman | set | messageid: <1607553064.1.0.611198361082.issue34750@roundup.psfhosted.org> |
2020-12-09 22:31:04 | ethan.furman | link | issue34750 messages |
2020-12-09 22:31:04 | ethan.furman | create | |
|