[IPython-dev] Getting rid of "print" in ipython
Wed Jul 9 16:44:12 CDT 2008
On Wed, Jul 9, 2008 at 10:00 AM, Hans Meine <firstname.lastname@example.org> wrote:
> On Mittwoch 09 Juli 2008, Edward K. Ream wrote:
>> On Wed, Jul 9, 2008 at 9:59 AM, Hans Meine <email@example.com> wrote:
>> > What are those arguments?
>> def print(*args, sep=' ', end='\n', file=None)
> OK, so this is not really surprising, but I don't see which of the arguments
> could be needed in IPython. Actually, I like string interpolation even more
> than passing separate args, and one could even discuss the \n (e.g. whether
> to append it automatically or be explicit about it), but file is certainly
> not needed (it's up to the frontend IMO).
> So I would really propose to just use a minimum wrapper around
> sys.stdout/err.write, which is exactly what iplib already offers. :-)
Fortunately the current interface is almost a subset of the above,
except for the file option and the fact that we don't append the \n.
So if we decide to extend to a 3k-compatible print function, no code
working today would break. We might want to add at least the 'end'
option soon to keep the newline-handing interface future-proof.
I still do like separate out/err functions rather than a keyword in this case.
More information about the IPython-dev