mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Convert a pile of obvious "yes/no" functions to return bool.
This commit is contained in:
parent
2f486b7fa6
commit
bc0e910826
34 changed files with 117 additions and 122 deletions
|
@ -600,8 +600,8 @@ class FieldStorage:
|
|||
if self.list is None:
|
||||
raise TypeError, "not indexable"
|
||||
for item in self.list:
|
||||
if item.name == key: return 1
|
||||
return 0
|
||||
if item.name == key: return True
|
||||
return False
|
||||
|
||||
def __len__(self):
|
||||
"""Dictionary style len(x) support."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue