break if try

The Python programming language, which has become the standard for scripting in ArcGIS 10.x, is quite versatile, and has a very natural language style.  One specific difference from earlier languages (like C) is that variables don’t have to be declared or cast.  Instead, they can be declared and assigned in the same statement.  Variables have to start with either a letter or an underscore, but can otherwise contain any characters except a dash.  However, there are some reserved words which cannot be used as variable names.  Here’s a list of those words:

True, False, None, and, as, assert, break, class, continue, def, del, elif,
else, except, finally, for, from, global, if, import, in, is, lambda,
nonlocal, not, or, pass, raise, return, try, while, with, yield

I’ve started studying Python recently, so it will be the focus of the next few blog posts.  Stay tuned for more useful information.

Comments are closed.