Make use of new str.startswith/endswith semantics.
Occurences in email and compiler were ignored due to backwards compat requirements.
diff --git a/Lib/warnings.py b/Lib/warnings.py
index b5d75e4..4b4119d 100644
--- a/Lib/warnings.py
+++ b/Lib/warnings.py
@@ -46,7 +46,7 @@
     filename = globals.get('__file__')
     if filename:
         fnl = filename.lower()
-        if fnl.endswith(".pyc") or fnl.endswith(".pyo"):
+        if fnl.endswith((".pyc", ".pyo")):
             filename = filename[:-1]
     else:
         if module == "__main__":