path module
Skip Montanaro
skip at pobox.com
Tue Jul 8 10:03:15 EDT 2003
>> a/b/c/d
>>
>> is nicely analogous to Unix pathname syntax.
Just> But when the items are variables, what you read is not what you
Just> get. Often you'll want (some) literals, and then you get
Just> path = basePath/"a"/"b"/"c"
Just> ...and _that_ I find quite horrible...
I don't know for sure, but I suspect the above could also be
path = basePath/"a/b/c"
Still not perfect, but in any case, the '/' is meant to be suggestive, not
literal. Perhaps you would have preferred he use ':'? ;-)
Just> (Did I mention that / usually means divide in Python? ;-)
Sure, just like '%' means modulo in Python, but it seems to have found a
home in printf-style string expansion.
Skip
More information about the Python-list
mailing list