From 223f9b35326df01090b123621965d04c07543185 Mon Sep 17 00:00:00 2001 From: Akhileswar Date: Thu, 23 Oct 2025 23:03:58 +0530 Subject: [PATCH] updated functools, bisect_algos --- 42_Bisect_algorithm_function.py | 2 +- 43_Functools_module.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/42_Bisect_algorithm_function.py b/42_Bisect_algorithm_function.py index c9fd5f8..c3af19c 100644 --- a/42_Bisect_algorithm_function.py +++ b/42_Bisect_algorithm_function.py @@ -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 diff --git a/43_Functools_module.py b/43_Functools_module.py index 05f789c..df1659d 100644 --- a/43_Functools_module.py +++ b/43_Functools_module.py @@ -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 @@ -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