[Python-ideas] Desperate need for enhanced print function

Anand Krishnakumar anandkrishnakumar123 at gmail.com
Sat Sep 5 21:33:00 CEST 2015


This is my first time I'm sending an email to the python-ideas mailing
list. I've got an enhancement idea for the built-in print function and I
hope it is as good as I think it is.

Imagine you have a trial.py file like this:

a = 4
b = "Anand"

print("Hello, I am " + b + ". My favorite number is " + str(a) + ".")
print("Hello, I am ", b, ". My favorite number is ", a, ".")

Well I've got an idea for a function named "print_easy" (The only valid
name I could come up with right now).

So print_easy will be a function which will be used like this (instead of
the current print statement in trial.py) :

print_easy("Hello, I am", b, ". My favorite number is", a ".")

Which gives out:

Hello, I am Anand. My favorite number is 4

The work it does is that it casts the variables and it also formats the
sentences it is provided with. It is exclusively for beginners.

I'm 14 and I came up with this idea after seeing my fellow classmates at
school struggling to do something like this with the standard print
Sure, you can use the format method but won't that be a bit too much for
beginners? (Also, casting is inevitable in every programmer's career)

Please let me know how this sounds. If it gains some traction, I'll work on
it a bit more and clearly list out the features.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150905/0d2a3dcd/attachment.html>

More information about the Python-ideas mailing list