Dr. Phillip M. Feldman wrote:

> I wrote a handy-dandy function (see below) called "strip_pairs" for
> stripping
> matching pairs of characters from the beginning and end of a string.  This
> function works, but I would like to be able to invoke it as a string
> method
> rather than as a function.  Is this possible?

This requires a feature called "open classes" (Ruby has them). It is not 
possible in Python, at least for built-in types like str.

Peter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to