[PATCH] ui: prompt() takes sequence of responses in lieu of regexp
Alexander Solovyov
piranha at piranha.org.ua
Thu Apr 30 07:02:35 UTC 2009
On Thu, Apr 30, 2009 at 9:58 AM, Martijn Pieters <mj at zopatista.com> wrote:
> On Thu, Apr 30, 2009 at 08:57, Martijn Pieters <mj at zopatista.com> wrote:
>> I'll see you and raise you one:
>>
>> if r in set(choices or ()):
>
> aaaaaaand I just lost the game, because choices is a sequence of
> tuples. Corrected:
>
> if r in dict(choices or ()):
This will result in False in case choices are empty. :-)
--
Alexander
More information about the Mercurial-devel
mailing list