PEP308: a call for usability studies (was Re: Update to PEP308: if-then-else expression)

Tim Peters tim_one at email.msn.com
Thu Feb 13 05:13:26 CET 2003


[Carel Fellinger, experiments on <shudder> people]

That's a wonderful report.  Thank you for sharing it (I won't repeat it
here, but everyone do yourself a favor and read it).

> ...
> Not quite what you would have expected, hm.  I really hope someone
> steps forward and does some usability test before we grow a new wart
> on this beautifull language.

Guido is sensitive to this kind of stuff <wink -- notoriously sensitive, in
fact>.  I hope to see more of it too.

> ...
> Merel questioned the colons, she expected something that stood
> on its own (like a statement) after the collon, not merely a value.

More power to her.  The colon doesn't play an essential technical role in
Python's grammar for statements -- the formal grammar almost never needs it.
It's there because usability studies in ABC found that programming newbies
had trouble with indentation alone denoting block structure, but the
troubles went away if the block-opening statement grew a trailing colon.
Carrying that into an embedded expression seems to make some kind of "it's
the same as" sense to Python grownups, but it couldn't be more removed from
the original purpose of the colon.  Tell Merel that Uncle Timmy says she's a
very smart person!  OTOH, she better not find dict displays confusing too,
or I'll retract that.

> ...
>> All of these problems are solved by using punctuation
>> instead of keywords:
>>
>>     c ?? a || b          c ? a : b        c ? a ! b

> I didn't try these yet, will have to wait till tomorrow as the twins
> are fast asleep now.

If they can make head or tail out of those, trade in your children before
the warranty expires <wink>.






More information about the Python-list mailing list