Jeffrey Yasskin wrote: > On Jan 24, 2008 1:11 PM, Raymond Hettinger <python at rcn.com> wrote: [...] > > One of my goals for trunc() is to replace the from-float use of int(), > even though we can't remove it for backward-compatibility reasons. PEP > 3141 says: > > "Because the int() conversion implemented by float (and by > decimal.Decimal) is equivalent to but less explicit than trunc(), > let's remove it. (Or, if that breaks too much, just add a deprecation > warning.)" > > That needs to be updated and implemented. I think the decision was > that removing float.__int__() would break too much, so it needs a > deprecation warning in 3.0. > It seems strange to me that a release that has the avowed intention of producing a "more rational" language by breaking backwards compatibility should start out with deprecation warnings of this type. What's next: "This isn't Perl" when someone tries to add a number and a string? Surely the place to raise warnings is in 2to3. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
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