Changing to future division sitewide
Michael Williams
michael.williams at st-annes.oxford.ac.uk
Sun May 12 06:51:30 EDT 2002
We are about to embark on a series of trials of the Python language with
a view to replacing Pascal as the teaching language here in the
department of Physics at Oxford University [0]. We have a day (!) to
teach the language so we are really keen on using the new division that
returns a mathematically intuitive result (see
<http://www.python.org/peps/pep-0238.html>) as it is one less thing to
explain.
[0] Hence this port to EDU-Sig
However, our students will be using idlefork to program (both
intereactively and in stored modules). Is there any way we can get the
new division behaviour sitewide, i.e. we would like the new behaviour in
the following situations:
1) typing python at a command prompt (alias "python" to "python -Qnew"?)
2) running a module they've saved (or indeed any module)
This might be problematic as it would presumably apply to all modules
on the system which might break things--although this is a fresh
install of Python. All we have here is Python 2.2.1, Numeric,
Gnuplot.py (a Python wrapper of the Gnuplot program) and idlefork
(which is the development version of idle).
3) Someone using the interactive interpreter in idlefork
Presumably this is going to involve doing more than one thing if it
ieven possible. We could always tell our students to put "from
__future__ import division" at the start of every program without
explaining it, but that's the kind a black magic we hoped to avoid by
using Python rather than, say, C.
Yours hopefully,
--
Michael
More information about the Python-list
mailing list