Sensible feedback = was: {Re: [Edu-sig] re: Types and true division (was Re: strange output)}

Jason Cunliffe Jason Cunliffe" <jasonic@nomadics.org
Thu, 10 Oct 2002 13:47:02 -0400


Student Z from from Planet Y has just installed Python over IGSL [Inter Galactic
Subscriber Lines]. They might at first be a little confused...

>>> 1 / 2
0
>>> help(/)
SyntaxError: invalid syntax
>>> help("/")
no Python documentation found for '/'
>>> 1 / 2.0
0.5

Python always has deeply considered, intelligent reasons for doing everything it
does.
So what can we do to make visitors from Planet Y feel more welcome ?

More examples..

>>> /
SyntaxError: invalid syntax
>>> *
SyntaxError: invalid syntax
>>> +
SyntaxError: invalid syntax
>>> -
SyntaxError: invalid syntax

Since typing a command function alone like is obviously not 'pragramming', why
not just return some help about each function? This need not disturb Python's
design philosphy and decisions, but, simply a serious proposal to provide
valuable common sense help at the beginning and when the context is in no doubt.

Are there good Pythonic reasons was this can or should not be done?


./Jason