This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients Antony.Lee, bup, ethan.furman, josh.r
Date 2020-12-09.22:31:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1607553064.1.0.611198361082.issue34750@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-12-09 22:31:04ethan.furmansetrecipients: + ethan.furman, Antony.Lee, josh.r, bup
2020-12-09 22:31:04ethan.furmansetmessageid: <1607553064.1.0.611198361082.issue34750@roundup.psfhosted.org>
2020-12-09 22:31:04ethan.furmanlinkissue34750 messages
2020-12-09 22:31:04ethan.furmancreate