In this SO question [1] the OP has a need to generate an Enum lazily. I created an `extend_enum` function to do so. By the time I was done I realized I would not want anyone to have to create that function by hand, nor keep it up to date (should we ever change the implementation details). Should we add this to the stdlib? Note that this does not change anything about subclassing Enum. [1] http://stackoverflow.com/q/28126314/208880
I was thrown off a bit by the description below. it's not that the OP wants to generate an Enum lazily (the functional API lets them do that), it's that the OP wants to *extend* an Enum lazily. Seems like a pretty obscure use case to me. I'd vote for letting it live in SO and not putting it in the stdlib.
To me, the essential property of enums in other languages is that there is known limited set of possible values. If this set is dynamically extended, this is not enum.
Barry: po-tay-to / po-tah-to ;) Serhiy: The set is known and finite, just scattered over different expensive-to-load modules. Decision: Since no one is jumping up and down with anticipation over this feature, I'll let it stay on SO.
History
Date
User
Action
Args
2022-04-11 14:58:28
admin
set
github: 70708
2016-03-10 23:32:02
ethan.furman
set
status: open -> closedresolution: rejectedmessages: + stage: resolved