<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 3, 2018 at 8:24 AM, Random832 <span dir="ltr"><<a href="mailto:random832@fastmail.com" target="_blank">random832@fastmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, Dec 31, 2017, at 00:33, Guido van Rossum wrote:<br>
> I'm not keen on this recommendation. An argument that takes a Set[Foo]<br>
> would mean that in order to specify:<br>
> - no flags: you'd have to pass set() -- you can't use {} since that's an<br>
> empty dict, not an empty set<br>
<br>
</span>Optional[Set[Foo]]?<br>
<span class=""><br>
> - one flag: you'd have to pass {Foo.BAR} rather than just Foo.BAR<br>
> - two flags: you'd have to pass {Foo.BAR, Foo.BAZ} rather than Foo.BAR |<br>
> Foo.BAZ<br>
<br>
</span>Maybe the flags themselves should be of a type that you can do both with (i.e. each value is a set containing itself).<br></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">That's pretty much what the enum.Flag type does.<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>