Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53165
| References | <kvl470$b86$1@ger.gmane.org> |
|---|---|
| From | Oscar Benjamin <oscar.j.benjamin@gmail.com> |
| Date | 2013-08-28 16:21 +0100 |
| Subject | Re: python3 integer division debugging |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.314.1377703298.19984.python-list@python.org> (permalink) |
On 28 August 2013 16:15, Neal Becker <ndbecker2@gmail.com> wrote: > The change in integer division seems to be the most insidious source of silent > errors in porting code from python2 - since it changes the behaviour or valid > code silently. > > I wish the interpreter had an instrumented mode to detect and report such > problems. Is that a joke? Run the code under Python 2.6/2.7 with the -3 flag: $ cat test.py print(10 / 7) $ python -3 test.py test.py:2: DeprecationWarning: classic int division print(10 / 7) 1 Oscar
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: python3 integer division debugging Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-08-28 16:21 +0100
csiph-web