[Python-ideas] a set of enum.Enum values rather than the construction of bit-sets as the "norm"?

Franklin? Lee leewangzhong+python at gmail.com
Sun Dec 31 18:00:47 EST 2017

On Sun, Dec 31, 2017 at 12:09 PM, MRAB <python at mrabarnett.plus.com> wrote:
> On 2017-12-31 08:13, Paddy3118 wrote:
>> Hmm, yea I had not thought of how it would look - I had thought formost of
>> not needing to necessarily learn about bitsets.when learning about passing a
>> large number of optional flags to a function.
>> Although the default could be None, interpreted as an empty set of zero
>> values.; a set of one or more enums does use more characters compared to
>> or-ing flags...
> None is often used to represent a default, which might not be an empty set.

I see no reason not to allow an iterable collection of flags. That
will at least allow [] and ().

More information about the Python-ideas mailing list