The documentation of LoazyLoader.factory in the module importlib.util says:
classmethod factory(loader)
A static method which returns a callable that creates a lazy loader. This is meant to be used in situations where the loader is passed by class instead of by instance.
The problem is that there is a mixing of words classmethod and static method. And the documentation defines the static method as ... Static method objects are created by the built-in staticmethod() constructor.
The source code for the method is:
@classmethod
def factory(cls, loader):
"""Construct a callable which returns the eager loader made lazy."""
cls.__check_eager_loader(loader)
return lambda *args, **kwargs: cls(loader(*args, **kwargs))
So, in my opition, "a static method" in the documentation should be corrected to "a class method".
I've created the PR in case the issue is right.
Linked PRs
The documentation of LoazyLoader.factory in the module importlib.util says:
The problem is that there is a mixing of words classmethod and static method. And the documentation defines the static method as
The source code for the method is:
So, in my opition, "a static method" in the documentation should be corrected to "a class method".
I've created the PR in case the issue is right.
Linked PRs
imporlib.util.LazyLoader.factoryto properly call it a class method #101391imporlib.util.LazyLoader.factoryto properly call it a class method (GH-101391) #101813imporlib.util.LazyLoader.factoryto properly call it a class method (GH-101391) #101814