• 1 Post
  • 28 Comments
Joined 1 year ago
cake
Cake day: July 27th, 2023

help-circle





  • I discover the operator module! Amazing! 🤩

    The operator Module A third alternative to writing lambda functions is to use the standard library’s operator module. This module contains some predefined functions and function factories, which can replace the most common use cases for lambda functions. Let’s look at both of these separtaely, factories first. Another note: the function that attrgetter returns is implemented in C, so it’s slightly faster than using either a normal or lambda function.

    Useful if you want to speed up your code.