Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e67ac3

Browse files
SemeniukMNashwek
authored andcommitted
Fix '__bool__' method (TheAlgorithms#735)
The method returns the truth when the stack is empty
1 parent2c67f61 commit8e67ac3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎data_structures/stacks/stack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, limit=10):
1717
self.limit=limit
1818

1919
def__bool__(self):
20-
returnnotbool(self.stack)
20+
returnbool(self.stack)
2121

2222
def__str__(self):
2323
returnstr(self.stack)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp