[Python-Dev] / as path join operator (was: Re: The path module PEP)
Tony Meyer
t-meyer at ihug.co.nz
Thu Jan 26 00:51:04 CET 2006
[John J Lee]
> But it's a very readable way to write a common operation. Perhaps one
> reason the discrepancy you point out doesn't bother me is that
> division is
> the least-used of the +-*/ arithmetic operations.
Do you have evidence to back that up? It seems a strange claim.
Outside of doing 'maths-y' work, I would think I'd use + most (but
for strings), then / (for percentages).
> Also, &, | and ^ seem like some sort of precedent, to my brain (if
> they
> don't to yours, that's fine and I believe you ;-).
I don't follow this, sorry. You're referring to the bitwise operations?
[Ian Bicking]
> Curious how often I use os.path.join and division, I searched a
> project
> of mine, and in 12k lines there were 34 uses of join, and 1 use of
> division. In smaller scripts os.path.join tends to show up a lot more
> (per line). I'm sure there's people who use division far more than I,
> and os.path.join less, but I'm guessing the majority of users are more
> like me.
The problem with these sorts of guesses is that there's no evidence.
(Maybe the suggestion that Brett's PhD should collect a corpus of
Python scripts was a good one <wink>). Are mathematicians that under
represented? Is file processing that highly represented? I have no
idea.
=Tony.Meyer
More information about the Python-Dev
mailing list