Issue #19426: Fixed the opening of Python source file with specified encoding.
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py
index 2eae11b..f6de440 100644
--- a/Lib/idlelib/IOBinding.py
+++ b/Lib/idlelib/IOBinding.py
@@ -125,7 +125,7 @@
     Raise LookupError if the encoding is declared but unknown.
     """
     # Only consider the first two lines
-    str = str.split("\n", 2)[:2]
+    lst = str.split("\n", 2)[:2]
     for line in lst:
         match = coding_re.match(line)
         if match is not None: