On 16/05/13 00:18, Marc Tompkins wrote:
On Wed, May 15, 2013 at 3:52 PM, Marc Tompkins <marc.tompk...@gmail.com
<mailto:marc.tompk...@gmail.com>> wrote:
I was thinking along the lines of an optional parameter ("verbose"
or something similar), so print() would supply a return value if you
asked it to but keep stumm if you didn't.
After I hit Send, I thought of the obvious problem... you'd have to
know ahead of time which version of print() was available, because
you'll get a TypeError if you pass undefined keyword arguments to print().
On the other hand, it'd be a quickie to do that test at the top of your
code...
Or maybe we need a printf function in Python that has the C behaviour
(and takes other arguments, such as output stream?)
As to bytes v characters I'd opt for bytes since in dealing with
hardware/networks the bytes are more significant than the
characters...
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor