gratuitous new features in 2.0
Amit Patel
amitp at Xenon.Stanford.EDU
Fri Aug 25 21:13:03 EDT 2000
Guido van Rossum <guido at beopen.com> wrote:
|
| About 10 years ago I debated with myself whether to make the most
| basic from of output a function or a statement; basically I was trying
| to decide between "print(item, ...)" and "print item, ...". I chose
| to make it a statement because printing needs to be taught very early
| on, and is very important in the programs that beginners write.
I would have preferred either of:
1. Function calls don't require (). (ML!!)
print a, b, c
would be a call to a function print with three arguments.
2. Simple statements like print and exit are user-defined,
so you might define
statement print *args:
for a in args:
sys.stdout.write(str(a))
sys.stdout.write(' ')
I admit that beginners need to have some easy way to print. I just
don't like it being a special case solution, because I'd like to have
my own print-like syntax! I guess I'm a Schemer at heart. ;-)
- Amit
--
--
Amit J Patel, Computer Science Department, Stanford University
http://www-cs-students.stanford.edu/~amitp/
More information about the Python-list
mailing list