Re: True inconsistency in Python
"Ron Adam" <radam2@tampaba y.rr.com> wrote in message
news:7rhjrvgefd pfkm15divsor9e3 iktl0falh@4ax.c om...[color=blue]
> On Mon, 17 Nov 2003 23:40:52 -0500, "Terry Reedy" <tjreedy@udel.e du>
> wrote:
>[color=green]
> >In 2.2.2+, you only need to not change them and to not work with a
> >psycopath.[/color]
>
> Many people are starting to learn programming with python as their
> first computer language. I wouldn't refer to them as a psychopath.[/color]
Neither would I. I was thinking of the following scenario. You are
part of a programming group. You write module ronad, to be imported
by danor written by 'Dan Oreo'. Psycho writes unrelated module
'sneaky' with
import ronad
ronad.True, ronad.False = False, True
perhaps disguised. You get blamed for the 'bug' that you did not
write and cannot find.
[Prohibiting this scenario (import module and mask builtins there in)
has been suggested. I believe it was once approved and is still under
consideration but the change has the problem that there seem to be
legitimate uses.]
[color=blue]
> They may one day write programs that save peoples lives. They have[/color]
to[color=blue]
> start someplace. Many people using python will not be professional
> programmers but enthusiast and hobbiests, or web page programmers,
> or ..... in other words, a very large and diverse group.[/color]
People often post code redefining builtings like file and list, and
get reminders not to do so. I cannot remember anyone accidentally
overwriting True or False.
....[color=blue]
> I'm not sure what your point is here, but using PyChecker sounds[/color]
like[color=blue]
> a good suggestion.[/color]
That suggestion was my final point. Ignore the warm-up pitch.
Terry J. Reedy
"Ron Adam" <radam2@tampaba y.rr.com> wrote in message
news:7rhjrvgefd pfkm15divsor9e3 iktl0falh@4ax.c om...[color=blue]
> On Mon, 17 Nov 2003 23:40:52 -0500, "Terry Reedy" <tjreedy@udel.e du>
> wrote:
>[color=green]
> >In 2.2.2+, you only need to not change them and to not work with a
> >psycopath.[/color]
>
> Many people are starting to learn programming with python as their
> first computer language. I wouldn't refer to them as a psychopath.[/color]
Neither would I. I was thinking of the following scenario. You are
part of a programming group. You write module ronad, to be imported
by danor written by 'Dan Oreo'. Psycho writes unrelated module
'sneaky' with
import ronad
ronad.True, ronad.False = False, True
perhaps disguised. You get blamed for the 'bug' that you did not
write and cannot find.
[Prohibiting this scenario (import module and mask builtins there in)
has been suggested. I believe it was once approved and is still under
consideration but the change has the problem that there seem to be
legitimate uses.]
[color=blue]
> They may one day write programs that save peoples lives. They have[/color]
to[color=blue]
> start someplace. Many people using python will not be professional
> programmers but enthusiast and hobbiests, or web page programmers,
> or ..... in other words, a very large and diverse group.[/color]
People often post code redefining builtings like file and list, and
get reminders not to do so. I cannot remember anyone accidentally
overwriting True or False.
....[color=blue]
> I'm not sure what your point is here, but using PyChecker sounds[/color]
like[color=blue]
> a good suggestion.[/color]
That suggestion was my final point. Ignore the warm-up pitch.
Terry J. Reedy
Comment