mirror of
https://github.com/luong-komorebi/Awesome-Linux-Software.git
synced 2024-10-01 01:45:42 -04:00
Merge pull request #450 from cclauss/identity-vs-equality
Identity is not the same things as equality in Python
This commit is contained in:
commit
f0d5b00758
@ -54,7 +54,7 @@ def main():
|
|||||||
line = line.strip()
|
line = line.strip()
|
||||||
items.append(line)
|
items.append(line)
|
||||||
# When no more items, blank line or new header
|
# When no more items, blank line or new header
|
||||||
elif line is '\n':
|
elif line == '\n':
|
||||||
# when we meet the next header, we should stop adding new item to the list.
|
# when we meet the next header, we should stop adding new item to the list.
|
||||||
for item in sorted(items, key=lambda x: regex.findall(x.upper())[len(regex.findall(x.upper()))-1]):
|
for item in sorted(items, key=lambda x: regex.findall(x.upper())[len(regex.findall(x.upper()))-1]):
|
||||||
# write the ordered list to the temporary file.
|
# write the ordered list to the temporary file.
|
||||||
|
@ -54,7 +54,7 @@ def main():
|
|||||||
line = line.strip()
|
line = line.strip()
|
||||||
items.append(line)
|
items.append(line)
|
||||||
# When no more items, blank line or new header
|
# When no more items, blank line or new header
|
||||||
elif line is '\n':
|
elif line == '\n':
|
||||||
# when we meet the next header, we should stop adding new item to the list.
|
# when we meet the next header, we should stop adding new item to the list.
|
||||||
for item in sorted(items, key=lambda x: regex.findall(x.upper())[len(regex.findall(x.upper()))-1]):
|
for item in sorted(items, key=lambda x: regex.findall(x.upper())[len(regex.findall(x.upper()))-1]):
|
||||||
# write the ordered list to the temporary file.
|
# write the ordered list to the temporary file.
|
||||||
|
@ -54,7 +54,7 @@ def main():
|
|||||||
line = line.strip()
|
line = line.strip()
|
||||||
items.append(line)
|
items.append(line)
|
||||||
# When no more items, blank line or new header
|
# When no more items, blank line or new header
|
||||||
elif line is '\n':
|
elif line == '\n':
|
||||||
# when we meet the next header, we should stop adding new item to the list.
|
# when we meet the next header, we should stop adding new item to the list.
|
||||||
for item in sorted(items, key=lambda x: regex.findall(x.upper())[len(regex.findall(x.upper()))-1]):
|
for item in sorted(items, key=lambda x: regex.findall(x.upper())[len(regex.findall(x.upper()))-1]):
|
||||||
# write the ordered list to the temporary file.
|
# write the ordered list to the temporary file.
|
||||||
|
Loading…
Reference in New Issue
Block a user