On Nov 20, 8:42 am, Brian Adkins <lojicdot...@gmail.com> wrote:
> On Nov 20, 7:38 am, Remco Hh <re...@huijdts.nl> wrote:
>
> > hi,
> > perhaps a stupid question.
>
> > i do this a lot: if (foo.bar==1 or foo.bar==2)
>
> > can i make this expression shorter and nicer?,
> > something like if (foo.bar=1,2), which of course doesn't work 
>
> You could have:
>
> foo.bar.equals_one(1, 2, 7)
>
> or
>
> equals_one(foo.bar, 1, 2, 7)
equals_any is probably a better name...