[Tutor] Making a Primary Number List generator

Marc Tompkins marc.tompkins at gmail.com
Thu May 16 01:29:30 CEST 2013


On Wed, May 15, 2013 at 4:14 PM, Oscar Benjamin
<oscar.j.benjamin at gmail.com>wrote:

> I don't really understand what the reason for having the information
> is. Would it return the number of characters written or the number of
> bytes?
>

It's absolutely useless in an interactive session, or any time that print()
is printing to the screen and the user can see it happening.  But when
you're printing to some other device - a disk file, a printer, a serial
port - it can be EXTREMELY handy to know 1) did it succeed or not and 2) if
it failed, how far did it get before it failed?

As for characters or bytes, that would depend on whether you were working
in ASCII or Unicode, I suppose...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130515/2a01edb9/attachment.html>


More information about the Tutor mailing list