Path inherits from basestring again

Peter Hansen peter at engcorp.com
Fri Jul 29 23:12:08 EDT 2005


NickC wrote:
> I'm usually not much of a purist, but C++ has convinced me that
> overloading an operator to mean something entirely unrelated to its
> mathematical meaning can be very unwise.

Me too.  In general.  I've yet to overload a single operator that way in 
years of writing Python code, though I definitely sinned with the rest 
of the C++ crowd (in the early days).

In actual usage with path.py, however, I've found the use of "/" to be 
quite unsurprising and benign relative to what I had expected.  That's 
why (to my surprise) I found myself using and appreciating it.

-Peter



More information about the Python-list mailing list