[PATCH] ui: prompt() takes sequence of responses in lieu of regexp

Martijn Pieters mj at zopatista.com
Thu Apr 30 06:57:03 UTC 2009


On Thu, Apr 30, 2009 at 08:44, Alexander Solovyov
<piranha at piranha.org.ua> wrote:
> On Thu, Apr 30, 2009 at 6:38 AM, Steve Borho <steve at borho.org> wrote:
>> +                if choices is None or r in [resp for (resp, name) in choices]:
>
> Isn't it easier to do:
>
> if not choices or r in dict(choices):

I'll see you and raise you one:

  if r in set(choices or ()):

-- 
Martijn Pieters




More information about the Mercurial-devel mailing list