From 345d51130aec9644dbeb08c3e54d93f83babbf3f 2017-09-22 15:53:46 From: Min RK Date: 2017-09-22 15:53:46 Subject: [PATCH] Merge pull request #10818 from takluyver/img-format-elif Change some if -> elif in display Image code --- diff --git a/IPython/core/display.py b/IPython/core/display.py index e45f32a..3f97269 100644 --- a/IPython/core/display.py +++ b/IPython/core/display.py @@ -1098,9 +1098,9 @@ class Image(DisplayObject): if ext is not None: if ext == u'jpg' or ext == u'jpeg': format = self._FMT_JPEG - if ext == u'png': + elif ext == u'png': format = self._FMT_PNG - if ext == u'gif': + elif ext == u'gif': format = self._FMT_GIF else: format = ext.lower()