0x07 Python for (Nuke) Compers - More loops, and a (very) brief look at some error handling

Опубликовано: 26 Июль 2026
на канале: Anthony Tan
1,668
38

A little bit more on loops, doing a bit of error protection so your code can deal with more scenarios, because it's good form, and you'll start recognizing these patterns in code.

You'll see both these things used, one is where you check if you can do it, and then do it (LBYL/Look Before You Leap, or 'gating' things - as in, putting in a gate that keeps out people who shouldn't walking through). The other is to use python's Exception handling, with a specific construct: try/except which takes advantage of this.

Both are are valid ways to work, and you'll seem em both floating around so wanted to explain them.

( https://en.wikipedia.org/wiki/Duck_ty... for those of you who don't feel like typing out URIs from my video )