Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-18 Thread inv2004
After looking into the PR I suppose that the problem is in "default" meaning of bare-expect. If the target to move into panics:on some day - it is good, but in the case default expect should be like `expect CatchableErrors` now, but without any "Catch

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-18 Thread Araq
> Btw you can avoid such bugs by ...testing your software thoroughly. And once you do that you might as well through away all these silly `.raises` annotations _cough_. Don't get me wrong, static typing is still great but there is an optimal amount of it, "the more the better" rarely applies in

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-18 Thread planetis
Btw you can avoid such bugs by ...testing your software thoroughly. Fuzzing can help you in this

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-17 Thread Hlaaftana
Didn't say anything before in lieu of being unproductive but I never understood removing bare `except:` when it was an established feature for basically the entirety of the language's existence and it was also the most concise way of expressing the desired behavior; or why Defect was still an Ex

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-17 Thread Araq
> PS: Just compiled jsony - few pages just of the warning. I am afraid that 80% > of libs will supress it one or another way. This warning should be opt-in indeed.

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-17 Thread Symb0lica
FWIW, I use a template to catch both CatchableError and Defect, with a check in the module that makes building with options that would make this invalid a compile error. # # catchAll template to replace unqualified try: except: blocks # # Check compile options allow ca

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-16 Thread inv2004
I think it is the same like to suggest to show all mm:none or arc warnings for mm:org. But in case to show that problem is possible here But my idea to show the error, not to hide, because the exect Catchable, Defect will hide the problem, that is why I think it is better to show it when you re

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-16 Thread ElegantBeef
Is it not better to just turn it off if you do not care with `--warning[BareExcept]: off` so it does not effect all code, just your project? Any library that does expect a `defect` to be caught is the issue, if you know you want it caught that's down to you.

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-16 Thread inv2004
I think that you are right, but it does not mean that it will be 100% ideal and better to not close the app anyway - I think it is a bit another question And one more question: I started to write `except CatchableError, Defect` everywhere just to supress the warning, that is why I think it would

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-16 Thread ElegantBeef
I feel like your anecdote with asciigraph is exactly evidence to the contrary, though that is just wishful thinking. The hope being if the library was developed where `try except` did not work on defects perhaps it would not have this bug.

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-16 Thread inv2004
After the suggestion I still think that it would be better to not show the warning with panics:off

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-15 Thread Araq
> how to catch everything is still actual. By using `try: except :`

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-15 Thread inv2004
To closed the thread. I think that my initial problem and reaction came from the bad code in parsing like split()[idx] and it is just forced me to rewrite it better way with scanf after it I did not find any important [idx] and which fails - definitely bug and have to be fixed - thank you for e

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-14 Thread inv2004
Hello, It is continue of the and After digging of the some code I found that IndexError was always inherited from Defect. Probably it is my personal problem that it was unexpected, that is why I want to clarify it for me: