[Python-Dev] Defining a path protocol

INADA Naoki songofacandy at gmail.com
Thu Apr 7 03:04:28 EDT 2016

FYI, Ruby's Pathname class doesn't inherit String.


Ruby has two "convert to string" method.
`.to_s` is like `__str__`.
`.to_str` is like `__index__` but for str.  It is used for implicit

File.open accepts any object implements `.to_str`.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20160407/440b8e55/attachment.html>

More information about the Python-Dev mailing list