Skip to content

string_processing: Handle overloaded operators when splitting long strings #2334

@bbugyi200

Description

@bbugyi200

I'm not sure how often pathlib.Path is used with the augmented assignment operator rather than the regular one (/) nor do I know how often the string would be long enough that it would need to be split but all that aside, /= can definitely appear with strings on the right-hand of the assignment operator too:

from pathlib import Path
x = Path.cwd()
x /= "directory/subdirectory/file.txt"

Originally posted by @jack1142 in #2312 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.F: linebreakHow should we split up lines?F: stringsRelated to our handling of stringsS: acceptedThe changes in this design / enhancement issue have been accepted and can be implementedT: enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions