A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-January/060092.html below:

Dev] / as path join operator

[Python-Dev] / as path join operator [Python-Dev] / as path join operatorStephen J. Turnbull stephen at xemacs.org
Thu Jan 26 05:21:10 CET 2006
>>>>> "Steven" == Steven Bethard <steven.bethard at gmail.com> writes:

    Steven> My only fear with the / operator is that we'll end up with
    Steven> the same problems we have for using % in string formatting
    Steven> -- the order of operations might not be what users expect.

Besides STeVe's example, (1) I think it's logical to expect that

    Path('home') / 'and/or'

points to a file named "and/or" in directory "home", not to a file
named "or" in directory "home/and".

(2) Note that '/' is also the path separator used by URIs, which RFC
2396 gives different semantics from Unix.  Most of my Python usage to
date has been heavily web-oriented, and I'd have little use for /
unless it follows RFC 2396.  By that, I mean that I would want the /
operator to treat its rhs as a relative reference, so the result would
be computed by the algorithm in section 5.2 of that RFC.  But this is
not correct (realpath) semantics on Unix.

-- 
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4