mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-08 14:55:53 +00:00
Data type of data given and docstring generated for Node class constructor
This commit is contained in:
parent
e89bb5c3a9
commit
3621bf39c9
@ -17,7 +17,12 @@ class Node:
|
||||
Node(None)
|
||||
"""
|
||||
|
||||
def __init__(self, data) -> None:
|
||||
def __init__(self, data: int) -> None:
|
||||
"""COnstructor of Node class
|
||||
|
||||
Args:
|
||||
data (int): Data of node
|
||||
"""
|
||||
self.data: int = data
|
||||
self.next_node: Node | None = None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user