[PATCH] cleanup: use x in (a, b) instead of x == a or x == b

Martin Geisler mg at lazybytes.net
Thu Sep 23 02:54:53 CDT 2010


Brodie Rao <brodie at bitheap.org> writes:

> # HG changeset patch
> # User Brodie Rao <brodie at bitheap.org>
> # Date 1285218151 18000
> # Node ID a9641ee7e37cf6da972ef07e9c8992316587c51a
> # Parent  f1e8d6f6e682a74a135ba6509b2de26cc8172046
> cleanup: use x in (a, b) instead of x == a or x == b

I believe I tested this at some point using timeit and found that the
longer form is faster. Did you test is too?

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list