diff options
author | Georg Brandl <georg@python.org> | 2006-06-09 20:43:48 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-06-09 20:43:48 (GMT) |
commit | b2afe855e5d75a570707d6bf0e32206e4b7b1c4d (patch) | |
tree | b637a7e78de40cf155c471e702e9b465fcd0625d /Lib/warnings.py | |
parent | 3ebef999e60cc63baafcdcfa0fd05c063715a66c (diff) | |
download | cpython-b2afe855e5d75a570707d6bf0e32206e4b7b1c4d.zip cpython-b2afe855e5d75a570707d6bf0e32206e4b7b1c4d.tar.gz cpython-b2afe855e5d75a570707d6bf0e32206e4b7b1c4d.tar.bz2 |
Make use of new str.startswith/endswith semantics.
Occurences in email and compiler were ignored due to backwards compat requirements.
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r-- | Lib/warnings.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ def warn(message, category=None, stacklevel=1): 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__": |