From the course: Learning ArcGIS Python Scripting (2018)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Reserved words

Reserved words - ArcGIS Tutorial

From the course: Learning ArcGIS Python Scripting (2018)

Start my 1-month free trial

Reserved words

- [Instructor] There are a set of reserved words in Python and sets of reserved words in each of the modules that you import into Python. These words all have special meaning. I'll show you how to get a list of these reserved words so that you don't use them as variable names, and I'll also show you how to get help on these words. I'm in idle, in a shell window. A list of reserved words can be seen in this shell window by using the dir command. With dir you pass to it the word builtins inside parenthesis and there are two underscores before and after the word builtins. It's kind of strange but that's how it is. So when you type dir builtins you get a list of all of the builtin words that are part of the core of Python. Some of the reserved words are written in all lowercase like this word raw_input, which stops the script and asks the user to input something. While others have uppercase letters at the beginning of each word as in this one called RuntimeError. There's no way to know…

Contents