Raymond Hettinger wrote: > The shortcut is to fix something that isn't broken and have string.atoi > stop automatically appending the ten to the int() call. > > Current string.atoi: > def atoi(s, base=10): > return _int(s, base) > > Proposed string.atoi: > def atoi(s, *args): > return _int(s, *args) > > The shortcut has some appeal because it lets the improvements > to _tkinter stay in place and allows existing Pmw installations > to continue to operate. Otherwise, one of the two has to change. > > Does anyone think changin string.atoi is the wrong way to go? Yes, because it changes the semantics. string.atoi() would suddenly start to accept non-strings like integers, floats, etc. My suggestion would be to carefully reconsider the changes to _tkinter. If it's true that a method can now return strings *and* integers which previously only returned strings, then such a change is clearly not backward compatible. I'd create a new method for the new semantics in that case. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Mar 18 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2003, Oxford: 14 days left EuroPython 2003, Charleroi, Belgium: 98 days left
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