[Edu-sig] Python as a first language for computer sciencist
Kirby Urner
urnerk at qwest.net
Wed Oct 19 20:11:00 CEST 2005
> Python falls short in this respect. Consider this program:
>
> def plus2(realNumber):
> raelNumber = realNumber+2
> return realNumber
>
IDLE 1.1
>>> def plus2(realNumber):
raelNumber = realNumber+2
return realNumber
>>> gimme = plus2(10)
>>> gimme
10
I seem to recall some external module that's paw through code looking for
potential problems of this kind.
Technically speaking, there's no mistake here. The coder created a local
variable that went out of scope. He could always say "I meant to do that."
Kirby
More information about the Edu-sig
mailing list