Undefined behaviour in C [was Re: The Cost of Dynamism]
Terry Reedy
tjreedy at udel.edu
Sun Mar 27 12:39:30 EDT 2016
On 3/27/2016 11:48 AM, Ned Batchelder wrote:
> On Sunday, March 27, 2016 at 10:43:49 AM UTC-4, BartC wrote:
>> whether fn has an explicit return or not, and not allowing:
>>
>> fn # and other kinds of expression
>>
>> unless some keyword is used.
>
> Python *could* have made it an error to have a useless expression as a
> statement.
In interactive mode, which is an essential part of Python, expression
statements print the value of the expression. Thus no expression is
useless.
So Bart is proposing to either disable an extremely useful feature or
split Python into two slightly different dialects. I think both are bad
ideas.
--
Terry Jan Reedy
More information about the Python-list
mailing list