From: Steve Holden Date: Wed, 2 Feb 2005 18:47:18 +0000 (+0000) Subject: Simplify string comparison using startswith() X-Git-Tag: v2.5a0~2067 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=69b8caa23a598f3192981898eb213f9578fbf0be;p=thirdparty%2FPython%2Fcpython.git Simplify string comparison using startswith() --- diff --git a/Lib/bsddb/db.py b/Lib/bsddb/db.py index b2ee14e53754..3bd0c8ba4e0a 100644 --- a/Lib/bsddb/db.py +++ b/Lib/bsddb/db.py @@ -37,7 +37,7 @@ # case we ever want to augment the stuff in _db in any way. For now # it just simply imports everything from _db. -if __name__[:len('bsddb3.')] == 'bsddb3.': +if __name__.startswith('bsddb3.'): # import _pybsddb binary as it should be the more recent version from # a standalone pybsddb addon package than the version included with # python as bsddb._bsddb.