[Python-ideas] Dunder method to make object str-like

Paul Moore p.f.moore at gmail.com
Thu Apr 7 12:00:40 EDT 2016

On 7 April 2016 at 16:46, Alexander Walters <tritium-list at sdamon.com> wrote:
> On 4/7/2016 11:43, Ethan Furman wrote:
>> The problem with that is that Paths are conceptually not strings, they
>> just serialize to strings, and we have a lot of infrastructure in place to
>> deal with that serialized form.
> Does any OS expose access to paths as anything other than the serialized
> form?

Does any OS have an object oriented API? At the OS level, you're lucky
to get any sort of structured access, so I don't think that "what the
OS provides" is the level to look at this at. Languages are what
provide abstractions. Lisp provides a path object, I believe. Perl
does (although it may well be a 3rd party CPAN library as with a lot
of things in Perl). A path abstraction isn't commonly provided, but
that doesn't mean it's not useful.

But this is of course offtopic for this thread.

More information about the Python-ideas mailing list