From: Catalin Marinas Date: Wed, 28 Feb 2007 11:10:22 +0000 (+0000) Subject: Use and..or as a ternary operator rather than a dictionary X-Git-Tag: v0.14.3~310 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/73e3a6fff48a84a7c109d4f6d16abb30c0104804?hp=b3ae3e141a388b9c17c0abab70812dcdab512a05 Use and..or as a ternary operator rather than a dictionary Signed-off-by: Catalin Marinas --- diff --git a/stgit/gitmergeonefile.py b/stgit/gitmergeonefile.py index 3a55195..6f4c1d7 100644 --- a/stgit/gitmergeonefile.py +++ b/stgit/gitmergeonefile.py @@ -134,7 +134,7 @@ def interactive_merge(filename): mtime = os.path.getmtime(filename) print 'Trying the interractive %s merge' % \ - {True: 'three-way', False: 'two-way'}[three_way] + (three_way and 'three-way' or 'two-way') err = os.system(imerger % files_dict) if err != 0: