Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread W. eWatson
Ben Finney wrote: "W. eWatson" writes: Steven D'Aprano wrote: NameError: name 'mod' is not defined So where is it? Here are the choices. import sys, os, glob import string from numpy import * If you use ‘from foo import *’ you forfeit any way of saying where a name in your code gets boun

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread Steven D'Aprano
On Fri, 01 Jan 2010 13:48:28 +1100, Ben Finney wrote: > "W. eWatson" writes: > >> Steven D'Aprano wrote: >> > NameError: name 'mod' is not defined > >> So where is it? Here are the choices. import sys, os, glob >> import string >> from numpy import * > > If you use ‘from foo import *’ you forf

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread Ben Finney
"W. eWatson" writes: > Steven D'Aprano wrote: > > NameError: name 'mod' is not defined > So where is it? Here are the choices. > import sys, os, glob > import string > from numpy import * If you use ‘from foo import *’ you forfeit any way of saying where a name in your code gets bound. Hence,

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread MRAB
W. eWatson wrote: Steven D'Aprano wrote: On Thu, 31 Dec 2009 17:30:20 -0800, W. eWatson wrote: About a year ago, I wrote a program that used mod() for modulo under 2.5. Apparently, % is also acceptable, but the program works quite well. I turned the program over to someone who is using 2.4, an

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread MRAB
W. eWatson wrote: About a year ago, I wrote a program that used mod() for modulo under 2.5. Apparently, % is also acceptable, but the program works quite well. I turned the program over to someone who is using 2.4, and apparently 2.4 knows nothing about mod(). Out of curiosity, what library is mo

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread W. eWatson
Steven D'Aprano wrote: On Thu, 31 Dec 2009 17:30:20 -0800, W. eWatson wrote: About a year ago, I wrote a program that used mod() for modulo under 2.5. Apparently, % is also acceptable, but the program works quite well. I turned the program over to someone who is using 2.4, and apparently 2.4 kn

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread Jan Kaliszewski
01-01-2010 o 02:30:20 W. eWatson wrote: About a year ago, I wrote a program that used mod() for modulo under 2.5. Apparently, % is also acceptable, but the program works quite well. I turned the program over to someone who is using 2.4, and apparently 2.4 knows nothing about mod(). Out of

Re: mod, modulo and % under 2.4 and 2.5

2009-12-31 Thread Steven D'Aprano
On Thu, 31 Dec 2009 17:30:20 -0800, W. eWatson wrote: > About a year ago, I wrote a program that used mod() for modulo under > 2.5. Apparently, % is also acceptable, but the program works quite well. > I turned the program over to someone who is using 2.4, and apparently > 2.4 knows nothing about