On 16/05/13 06:02, Alan Gauld wrote:
On 15/05/13 16:51, Marc Tompkins wrote:

Actually, I was mixing up my memory of an overloaded print() function

And C's printf() returns the number of chars printed.
I actually wish python had followed suit because, as Marc says,
it can occasionally be useful...


Guido's time machine strikes again.


py> import sys
py> sys.stdout.write('NOBODY expects the Spanish Inquisition!\n')
NOBODY expects the Spanish Inquisition!
40


The write() method of file objects in Python 3 return the number of characters 
written.



--
Steven
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to