If you're coming from a compiled language context, using exceptions for flow control would look odd to you. But here's the thing - in the python world, exceptions are super cheap and using them for flow control is the "idiomatic python" way!
In fact, exception-driven flow control is built right into the language itself e.g. the "for" loop in python terminates when the iterable raise a "StopIteration" exception!
There is a lot of material on the internet already on the topic, so if there's one thing you take out of this post, it's this - in python, it's "Easier to Ask for Forgiveness than Permission"!
In fact, exception-driven flow control is built right into the language itself e.g. the "for" loop in python terminates when the iterable raise a "StopIteration" exception!
There is a lot of material on the internet already on the topic, so if there's one thing you take out of this post, it's this - in python, it's "Easier to Ask for Forgiveness than Permission"!
thanks for sharing this information
ReplyDeletepython training in bangalore
best python training institute in bangalore
python training in jayanagar bangalore
Artificial Intelligence training in Bangalore
data science with python training in Bangalore
RPA Training in Bangalore
Blue Prism Training in Bangalore
Google Cloud Training in Bangalore
Get real time project based and job oriented Salesforce training India course materials for Salesforce Certification with securing a practice org, database terminology, admin and user interface navigation and custom fields creation, reports & analytics, security, customization, automation and web to lead forms.
ReplyDeleteGone through this wonderful coures called Salesforce Certification Training in Dallas who are offering fully practical course, who parent is Salesforce Training in USA and they have students at Salesforce Training classes in Canada institutes.
ReplyDelete