gratuitous new features in 2.0

Quinn Dunkan quinn at baht.ugcs.caltech.edu
Sun Aug 27 00:21:52 EDT 2000


On 26 Aug 2000 20:16:29 GMT, Manuel Gutierrez Algaba
<thor at localhost.localdomain> wrote:
>On Sat,  Guido van Rossum <guido at beopen.com> wrote:
>>"John W. Baxter" <jwbnews at scandaroon.com> writes:
>>> Guido is so darn sharp that it's easy to agree which his 
>>> positions...particularly after he's had a give and take with other darn 
>>> sharp folks and taken their good ideas into account.
>>
>>Thanks! ;-)  Please take the following idea into account:
>>
>>Suppose you have written a function that uses the print statement:
>>
>>    def table(n):
>>	for j in range(1, n+1):
>>	    for i in range(1, n+1):
>>		print i, 'x', j, '=', i*j
>>	    print
>>
>>Now you are asked to make it print to another file -- a standard
>>example of how software typically is asked to evolve.
>
>What about ?:
>
>def table(n, file=None):

My software evolves that way all the time.  Here's what I do:

python program.py >file

I don't even have to modify the program!

I don't like the ">>" proposal because it's a syntax addition for such a
debatable gain.

I didn't respond to Guido's original post since it didn't show up here.



More information about the Python-list mailing list