Again: Please hear my plea: print without softspace

Stephen Horne steve at ninereeds.fsnet.co.uk
Thu Mar 4 17:37:17 EST 2004


On Thu, 04 Mar 2004 12:52:27 GMT, Dang Griffith
<noemail at noemail4u.com> wrote:

>On Tue, 02 Mar 2004 10:32:35 -0700, David MacQuigg <dmq at gain.com>
>wrote:
>
>>The 'print' statement is just shortcut for 'sys.stdout.write' with
>>some convenience features suitable for most users.  If you need
>>something else, just define your own shortcut, don't deprecate a
>>statement that is exactly what most users want.
>
>'print' is not a shortcut for 'sys.stdout.write'.
>'print' is a statement.  'sys.stdout.write' is a function.
>You can't define a shortcut for a statement.
>    --dang

To the best of my knowledge, the word 'shortcut', is in common
idiomatic use in English and refers to a quick and convenient means of
achieving the same goal, by obvious analogy to the literal meaning of
shortcut as a route to a given destination which is shorter than the
normal route.

The fact that in this case the means happens to be a statement as
opposed to a function doesn't seem relevant to me. And the fact that
programmers cannot define their own custom shortcuts in this way seems
equally irrelevant.

Actually, your protest seems analogous to saying 'that isn't a
shortcut to the highstreet because its a back alley - the normal route
is a proper road'. In literal shortcuts, the classification of roads,
back alleys, dirt tracks etc is irrelevant, and I see no reason to
fuss about technicalities such as the type of syntax in an idiomatic
use.

Similarly, I cannot build my own custom dirt tracks and back alleys,
yet I can still refer to existing ones as shortcuts.

If there was some specialist definition of the word 'shortcut' in
Python I might agree that David had made a poor choice of words, but
I'm not aware of any and even if there is that doesn't make normal
English usage invalid.

'print' is a quick and convenient way of doing much the same thing as
'sys.stdout.write'. It's a shortcut. I honestly can't see any logic in
claiming otherwise.

Even those unwanted spaces can be seen as analogous to the muck you
get all over your shoes in many literal shortcuts ;-)


-- 
Steve Horne

steve at ninereeds dot fsnet dot co dot uk



More information about the Python-list mailing list