|
From: Ethan A M. <merritt@u.washington.edu> - 2014-04-18 00:04:38
|
On Thursday, 17 April, 2014 23:36:13 Tait wrote: > > This topic has been argued for a long time. I think it might be useful > > to revive an old suggestion from Dave Denholm: > > > > > Date: Thu, 05 Aug 2004 17:50:43 +0100 > > > From: Dave Denholm <dde...@es...> > > > > > > I wonder if it is worth putting in special > > > code to detect division of two integer constants, and warn once per > > > session. (every evaluation would obviously be too often) Limiting this to integer constants would be tricky. By the time the evaluation code sees the division operation, the two operands have already been evaluated. I don't think there is any way to tell at that point whether these were "constants" or "result of integer expression" or "extracted from a user variable". > I like this idea if we choose not to auto-promote. > > For those already aware, the warning would get annoying. There should > be a way to suppress the warning (by using int()?), and for that matter > probably a way to suppress all warnings. |