Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 42_Bisect_algorithm_function.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bisect Algorithm Functions -> The bisect module in Python provides simple and fast (binary search based) functions to search an element in a sorted list.
"""The bisect module in Python provides simple and fast (binary search based) functions to search an element in a sorted list."""

# • Finding the insertion point (without insertion)
# • Inserting elements at the correct position
Expand Down
7 changes: 4 additions & 3 deletions 43_Functools_module.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Functools module in Python -> The functools module offers a collection of tools that simplify working with functions and callable objects.
"""The functools module offers a collection of tools that simplify working with functions and callable objects."""

# 1. Partial class
# The partial class fix certain arguments of a function and create a new function with fewer parameters.
"""The partial class fix certain arguments of a function and create a new function with fewer parameters."""

# Example:
from functools import partial
Expand All @@ -23,7 +23,8 @@ def power(a, b):


# 2. Partialmethod Class
# Partialmethod works like partial, but for class methods. It allows you to fix some method arguments when defining methods inside classes without making a new method manually.
"""Partialmethod works like partial, but for class methods.
It allows you to fix some method arguments when defining methods inside classes without making a new method manually."""

# Example:
from functools import partialmethod
Expand Down