On 03Mar2021 16:50, Grant Edwards <grant.b.edwa...@gmail.com> wrote:
>On 2021-03-03, Chris Angelico <ros...@gmail.com> wrote:
>> On Thu, Mar 4, 2021 at 1:40 AM Grant Edwards <grant.b.edwa...@gmail.com> 
>> wrote:
>>
>>> I thought the entire point of asser being a keyword was so that if you
>>> disable asserts then they go away completely: the arguments aren't
>>> even evaluated.
>>
>> It depends on what the point of "removing the assertions" is, but
>> yes, that will indeed still evaluate the arguments. IMO the cost of
>> running assertions isn't that high compared to the value of keeping
>> them (which is why I never run -O), and the performance argument is
>> a weak one compared to the much stronger value of having the actual
>> failing expression available in the exception report.
>
>Good point. I had forgotten about having the expression available in
>the exception output. That's definitly valuable.

Did we all see the recently announced ycecream PyPI module? Very cool!

See: https://github.com/salabim/ycecream

Cheers,
Cameron Simpson <c...@cskk.id.au>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to