![](https://secure.gravatar.com/avatar/047f2332cde3730f1ed661eebb0c5686.jpg?s=120&d=mm&r=g)
3 Jan
2018
3 Jan
'18
3:41 p.m.
On Wed, Jan 3, 2018 at 8:24 AM, Random832 <random832@fastmail.com> wrote:
On Sun, Dec 31, 2017, at 00:33, Guido van Rossum wrote:
I'm not keen on this recommendation. An argument that takes a Set[Foo] would mean that in order to specify: - no flags: you'd have to pass set() -- you can't use {} since that's an empty dict, not an empty set
Optional[Set[Foo]]?
- one flag: you'd have to pass {Foo.BAR} rather than just Foo.BAR - two flags: you'd have to pass {Foo.BAR, Foo.BAZ} rather than Foo.BAR | Foo.BAZ
Maybe the flags themselves should be of a type that you can do both with (i.e. each value is a set containing itself).
That's pretty much what the enum.Flag type does. -- --Guido van Rossum (python.org/~guido)