On Thu, Nov 08, 2018 at 09:36:53AM -0600, Zachary Ware wrote: > You can use any of the `print` function tricks above in Python 2 with > the following boilerplate: > > from __future__ import print_function > > import sys > > _orig_print = print > > def print(*args, **kwargs): > flush = kwargs.pop('flush', False) > _orig_print(*args, **kwargs) > if flush: > file = kwargs.get('file', sys.stdout) > file.flush()
Sorry, I don't understand that. Maybe its too early in the morning for my brain, but given that you've imported the Python 3 print function from the __future__ why do you need the customer wrapper? from __future__ import print_function alone should give you exactly the Python 3 print function, with all its bells and whistles. What have I missed? -- Steve _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor