Skip to content

Clarify wording of singleton provider scope in documentation. #917

@okotdaniel

Description

@okotdaniel

Description:

There is a sentence in the documentation that could use both a grammatical correction and a clearer explanation:

"Singleton provider scope is tied to the container. Two different containers will provider two different singleton objects:”

Link: https://python-dependency-injector.ets-labs.org/providers/singleton.html

Issues:

Typo: “provider” should be “provide.”

The sentence could be reworded for better readability and technical clarity.

Suggested Revision:

"Singleton provider scope is tied to the container. Two different containers will provide two different singleton instances."

Or alternatively:

"Since singleton scope is container-specific, each container will create and manage its own singleton instance. Therefore, two containers will provide two distinct singleton objects.”

The second alternative is more clearer and explains whats going on with the singleton provider and i would go with it as i make a pull request.

Why this matters:

Fixes a minor grammatical error

Improves the clarity of an important concept related to provider scoping and dependency injection

Helps avoid misunderstandings around singleton behavior across containers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions