Guido van Rossum <guido at python.org>: > The reason why it works at all for integers without __rmul__ is > complicated; it has to do with very tricky issues in trying to > implement multiplication of a sequence with an integer. I thought the plan was to get rid of all the special case code in the interpreter for multiplying sequences and push it all down into methods of the objects concerned, i.e. all sequences, including the built-in ones, would implement the C equivalent of both __mul__ and __rmul__ if they wanted to support multiplication on both sides. Is there some reason why that wouldn't work? Or is it just that nobody has had time to fix all the built-in sequences to work this way? Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4