Redefine print.function, #3

Some small TODOs remain, see them in the code.