Py3K idea: why not drop the colon?

Hendrik van Rooyen mail at microcorp.co.za
Tue Nov 14 01:23:03 EST 2006


"Simon Brunning" <simon at brunningonline.net> Wrote:

> On 11/11/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
> > Hendrik van Rooyen wrote:
> >
> > >> blue is red or green or yellow
> > >
> > > *grin* - this can be construed as a weakness in Python -
> >
> > it's boolean logic, and it's incompatible with human use of the same
> > terms in all contexts, not just Python.
>
> Indeed.
>
> The other day, I way showing my eight year old, Freja, what a program
> looks like:
>
> your_name = raw_input("What's your name? ")
> if your_name.lower() == "freja":
>     print "You're very stinky,", your_name
> else:
>     print "You smell lovely, ", your_name
>
> After running it a couple of times, she dove in and changed the 2nd line to:
>
> if your_name.lower() == "daddy or ella":
>
> (Ella is my other daughter's name.) That's pretty close to correct,
> I'd say - but you don't get anything for being close in a programming
> language.

This is true - and it is actually also an intractable problem - if you look at
what your daughter wrote, you get the feeling that you should be able to write
an interpreter that can implement what she meant, because it is quite clear to
you - until you try to write the specs...

Your daughter, btw, will go far if she already has the guts to do that...

- Hendrik




More information about the Python-list mailing list