print >> details???

spex66 spex66 at web.de
Fri Mar 8 08:30:18 EST 2002


Hi there,

I've tried this simple code (python 2.1.1 activestate):

class x:
   def write(self, s):
      print 'START'
      print s
      print 'END'

print >> x(), 'Hello'


and got following result:

START
Hello
END
START


END


where does the second call of x.write() come from???

thanks for any hints

Peter
(=PA=)





More information about the Python-list mailing list