Are the critiques in "All the things I hate about Python" valid? (Posting On Python-List Prohibited)
bartc
bc at freeuk.com
Tue Feb 20 14:46:37 EST 2018
On 20/02/2018 19:35, Lawrence D’Oliveiro wrote:
> On Wednesday, February 21, 2018 at 1:43:41 AM UTC+13, bartc wrote:
>> In Pascal (and presumably Ada) then all the
>> gubbins need to make this work properly:
>>
>> var x: 1..10;
>>
>> x = 10;
>> x = x + 1; { error? }
>
> Error on both statements. Pascal doesn’t allow a statement to just consist of an expression. At least, it didn’t the last time I checked.
OK, I forgot it needs := for assignment.
> Besides, it’s not clear what the point is of doing a comparison between those terms and throwing the result away.
Many languages including Python allow exactly that.
(The ones I create make it an error. Only certain kinds of expression
terms also have versions that can meaningfully be independent statements.)
--
bartc
More information about the Python-list
mailing list