Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Bertrand NÉRON
algo
Commits
e8438b35
Commit
e8438b35
authored
Sep 06, 2019
by
Bertrand Néron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✏
fix rst typos
parent
81501062
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Graph/graph/helpers.py
Graph/graph/helpers.py
+7
-2
No files found.
Graph/graph/helpers.py
View file @
e8438b35
...
...
@@ -23,6 +23,11 @@ class AbstractQueue(metaclass=ABCMeta):
def
__contains__
(
self
,
item
:
Any
)
->
bool
:
return
item
in
self
.
_queue
def
__str__
(
self
):
return
f
"
{
self
.
__class__
.
__name__
}
(
{
str
(
self
.
_queue
)[
6
:
-
1
]
}
)"
@
abstractmethod
def
add
(
self
,
item
:
Any
)
->
None
:
return
None
...
...
@@ -36,7 +41,7 @@ class FIFO(AbstractQueue):
"""
This structure allow to store any object,
The First element add to the structure will be the First element removed from it.
*F*irst *I*n *F*irst *O*ut
*
*F*
*\
irst
*
*I*
*\
n
*
*F*
*\
irst
*
*O*
*\
ut
"""
def
add
(
self
,
item
:
Any
)
->
Any
:
...
...
@@ -65,7 +70,7 @@ class LIFO(AbstractQueue):
"""
This structure allow to store any object,
The Last element add to the structure will be the First element removed from it.
*L*ast *I*n *F*irst *O*ut
*
*L*
*\
ast
*
*I*
*\
n
*
*F*
*\
irst
*
*O*
*\
ut
"""
def
add
(
self
,
item
:
Any
)
->
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment