Should nested classes in an Enum be Enum members?
Jim Lee
jlee54 at gmail.com
Fri Jun 29 19:33:53 EDT 2018
On 06/29/18 16:02, Cameron Simpson wrote:
> On 29Jun2018 10:36, Ethan Furman <ethan at stoneleaf.us> wrote:
>> On 06/28/2018 10:52 PM, Steven D'Aprano wrote:
>>> On Thu, 28 Jun 2018 18:33:31 -0700, Ethan Furman wrote:
>>>> Perhaps I am using Enum incorrectly, but here is my FederalHoliday
>>>> Enum.
>>>> Note that date(), next_business_day, and year() are all
>>>> callables. The
>>>> AutoEnum parent assigns values from 1 to n for each member. It's at
>>>> Stackoverflow [1] if you'd like up- or down-vote it. ;)
>>>
>>> It isn't clear to me why FederalHoliday is an Enum, especially as
>>> the API
>>> seems extremely baraque.
>>
>> Huh. I had to look that word up, and I still don't know what you
>> meant exactly, although I suspect it wasn't complimentary. ;-)
>
> It tends to mean "weird", but perhaps a more nuanced phrasing might be
> unusual and strange, and usually connotes some degree of over
> complication.
>
> Cheers,
> Cameron Simpson <cs at cskk.id.au>
It's actually "baroque", not "baraque", and Cameron has the right idea -
lavish, extravagant, overly complicated.
-Jim
More information about the Python-list
mailing list