Steven D'Aprano <st...@remove-this-cybersource.com.au> writes: > I'm surprised that you think that you should be able to apply > arbitrary mathematical operations to strings *before* turning them > into an int and still get sensible results. That boggles my mind.
I think the idea is you should not be able to do mathematical operations on strings, and if you try to do one, Python should raise an exception, rather than using hokey analogies to guess at what you were trying to do. If you want to replicate a sequence, introduce a function with a name like "replicate", rather than overloading an arithmetic operator. -- http://mail.python.org/mailman/listinfo/python-list