join vs instances
bbollenbach at home.com
Sun Dec 9 17:43:08 EST 2001
In article <qpb7tKAK49E8Ew$K at jessikat.fsnet.co.uk>, Robin Becker wrote:
> I had expected that the join operation would also apply to UserStrings
> somehow or that there would be some magic method that would allow join
> to be applied to user strings, but I can't find out how. What is the
> primitive implementation of join?
This raises an interesting point.
In looking at UserString.py, it's clear that the author of that module
/intended/ UserString instances to look like regular strings (__str__,
__rep__, etc. all return self.data).
Perhaps this string-look-alike behaviour breaks with builtin functions,
because they subvert the special class methods.
More information about the Python-list