[Tutor] Division

Gregor Lingl glingl@aon.at
Mon, 3 Dec 2001 07:48:40 +0100


Dear Tim!

Thanks! This works fine.

But unfortunataly there remains the problem of starting
IDLE - which I use to use with my students - in this new mode:

C:\python22\tools\idle -Qnew idle.py

starts IDLE without problems, but doesn't have the 
desired result:

Python 2.2b2 (#26, Nov 16 2001, 11:44:11) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
>>> 3/2
1
>>> 

So the interpreter working in the REP-loop inside IDLE seems not to 
be aware of the -Qnew option. How can this also be changed?

Gregor

----- Original Message ----- 
From: "Tim Peters" <tim.one@home.com>
To: "Gregor Lingl" <glingl@aon.at>; <tutor@python.org>
Sent: Sunday, December 02, 2001 8:10 PM
Subject: RE: [Tutor] Division


> [Gregor Lingl]
> > As I'm starting to give a new course 'Introduction to
> > programming' in Jan 2002. 
.....
> >
> > So my question is: Is there a way to start the Python-Interpreter
> > with new division enabled, 
.....
> Skip down to the "Command Line Option" section of PEP 238:
> 
>     http://python.sf.net/peps/pep-0238.html
> 
> As it says,
> 
>     The "new" option is only intended for use in certain educational
>     environments, where true division is required, but asking the
>     students to include the future division statement in all their
>     code would be a problem.
> 
> C:\Code\python\PCbuild>python -Qnew
> Python 2.2b2+ (#26, Nov 28 2001, 19:17:11) [MSC 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> 1/2
> 0.5
> >>> 1//2
> 0
> >>>
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>