Message369466
Yes, This is unexpected
In the first case:
Supplying an empty string can also mean no code has been supplied. So it could be better treated as 'pass'.
In the second case:
Error messages are meant to inform you of what you have done wrong so that you fix it. I think raising an Indentation error is far from what a user who is calling that method would be expecting, it does not help them at-all.
In the third case:
Supplying an empty string to timeit directly in bash ```python -m timeit '' ``` raises no such error. so we could say that fixing this will align the behavior in the two ways the function is run to be the same. |
|
Date |
User |
Action |
Args |
2020-05-20 16:37:05 | edison.abahurire | set | recipients:
+ edison.abahurire, anthonypjshaw, remi.lapeyre, rahul-kumi |
2020-05-20 16:37:05 | edison.abahurire | set | messageid: <1589992625.85.0.660310339211.issue40670@roundup.psfhosted.org> |
2020-05-20 16:37:05 | edison.abahurire | link | issue40670 messages |
2020-05-20 16:37:05 | edison.abahurire | create | |
|