Skip to content

Override operator + for Path and its subclasses #673

@aleexf

Description

@aleexf

Operator + is not overloaded and comes from the base class str so it returns an instance of type str. This behaviour isn't obvious at all:

>>> type(plumbum.local.path(".") + "/subdir")
<class 'str'>
>>> type(plumbum.local.path(".") / "subdir")
<class 'plumbum.path.local.LocalPath'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions