This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tomplast
Recipients serhiy.storchaka, tomplast, veky
Date 2021-02-13.12:13:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CABQrHD=TLia7iNObTg+_MYO94AO2oA_x48xNYO5CDptpyYYwxw@mail.gmail.com>
In-reply-to <1613217407.1.0.177645417195.issue43213@roundup.psfhosted.org>
Content
Sorry Serhiy, missed your answer there. I understand your point. I guess
I'll have to look for other things to help with :)

Thank you for the answer.

Guess this can be closed then.

Best regards
Tomas

On Sat, 13 Feb 2021, 12:57 Serhiy Storchaka <report@bugs.python.org> wrote:

>
> Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment:
>
> Path is not string, and it was made not string-like intentionally.
> Otherwise it would be made a subclass of str.
>
> If you want to check whether a string is a substring of the string
> representation of the path, just do it explicitly: 'share' in str(path).
> But in most cases it is not what the user intended.
>
> There were several propositions about implementing "in" (and iteration,
> these operations are related and should be consistent). The problem is that
> there several different meaning of that operation. Should it check that the
> directory referred by the path contains the specified file name? Or that
> the path contains the specified path component? Or that one path is a
> subpath of other path? Or that the specified string is a substring of the
> string representation of the path? (The latter proposition is the least
> useful.) It is better to avoid ambiguity, so all these proposition were
> rejected.
>
> ----------
> nosy: +serhiy.storchaka
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue43213>
> _______________________________________
>
History
Date User Action Args
2021-02-13 12:13:28tomplastsetrecipients: + tomplast, serhiy.storchaka, veky
2021-02-13 12:13:28tomplastlinkissue43213 messages
2021-02-13 12:13:28tomplastcreate