mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i)
This commit is contained in:
parent
78e057a32a
commit
46ac8eb3c8
11 changed files with 19 additions and 42 deletions
|
|
@ -269,9 +269,7 @@ class fifo:
|
|||
|
||||
def pop (self):
|
||||
if self.list:
|
||||
result = self.list[0]
|
||||
del self.list[0]
|
||||
return (1, result)
|
||||
return (1, self.list.pop(0))
|
||||
else:
|
||||
return (0, None)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue