Python Forum
feature request: ternary fallthroughs
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
feature request: ternary fallthroughs
#31
This will not win over any advocates:
Quote:Fallthroughs make sense. they exist. you can read the docs. You're just being a hobgoblin
So far the only examples of fall-through in other languages are C or C derived languages, and there it is only used in a switch block. I grew up being told that fall-through in a switch block was something to guard against and that if you felt like you needed to use fall-through you really needed to rethink your design. As I said before, I see the fallthrough statement in go as proof that Ken Thompson agrees that fall-through was a bad idea in general and should only be used in special cases.

Now if you could site other examples where fall-through is supported, particularly where it is not used in a case statement, it may bolster your proposal. I cannot think of any such example but always like expanding my horizons. It will certainly work better than slinging insults and making vague claims.
ndc85430 and buran like this post
Reply
#32
I don't see what's the benefit of continuing this discussion. Everyone tells you that (i) you fail to present compelling case/example, (ii) there are better, more pythonic ways to do what you try to present as example, e.g. try/except block and (iii) the references you make concern switch case and does not apply to your if else example (not to mention that the core problem is the exception you will get when try to convert non-int to int).

As I already said:

(May-05-2021, 07:45 PM)buran Wrote: And because your thread is titled feature request - note that we are not associated with Python Software Foundation / python core development team.


Feel free to address your suggestion to PSF/core development team and see what the reaction will be.
And frankly I am tired of people coming from some other language and start to complain about some feature or try to change python to be like the language they like better. If python is not your cup of tea, just pass and continue with whatever language best serve you.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  python on a ternary computer Skaperen 0 1,551 Jun-20-2020, 02:21 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020