<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python Terms Question in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689431#M2291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: SamanthaM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;*ahem* from &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ListLayoutElements/00s30000003w000000/"&gt;the help &lt;/A&gt;*ahem*&lt;BR /&gt;&lt;BR /&gt;[0] means the first in the list (ie. an individual Layout Element object). If you leave it off, it returns a &lt;SPAN style="font-style:italic;"&gt;list &lt;/SPAN&gt;of Layout Elements.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry about that, I figured the help section of python within ArcGIS would display that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]14999[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jun 2012 20:41:07 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2012-06-06T20:41:07Z</dc:date>
    <item>
      <title>Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689422#M2282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Learning ArcPy, just trying to familiarize myself with the terms. In the below image I believe I have identified everything correctly, except what "lyr" represents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]14975[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; The icon ArcGIS displays is a purple note stack. I am not sure what the term for this is. For example the term "For" is a statement, I believe, so what is the term for Lyr?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is another example&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]14976[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 15:35:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689422#M2282</guid>
      <dc:creator>SamanthaM</dc:creator>
      <dc:date>2012-06-06T15:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689423#M2283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: dkwiens&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From the &lt;/SPAN&gt;&lt;A href="http://docs.python.org/tutorial/controlflow.html"&gt;Python documentation &lt;/A&gt;&lt;SPAN&gt;(very useful):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"The for statement in Python differs a bit from what you may be used to in C or Pascal. Rather than always iterating over an arithmetic progression of numbers (like in Pascal), or giving the user the ability to define both the iteration step and halting condition (as C), Python�??s for statement iterates over the items of any sequence (a list or a string), in the order that they appear in the sequence."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, in your first example, "lyr" would be an "item", I guess. It's the "thing" in a bunch of "things".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 15:42:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689423#M2283</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-06-06T15:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689424#M2284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually it looks like the proper term for this is &lt;/SPAN&gt;&lt;STRONG&gt;method&lt;/STRONG&gt;&lt;SPAN&gt;. Can anyone confirm?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 15:49:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689424#M2284</guid>
      <dc:creator>SamanthaM</dc:creator>
      <dc:date>2012-06-06T15:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689425#M2285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: dkwiens&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure what the technical term is (possibly "object"), but the purple note stack means "it's something the Python window knows about". I can only assume that you assigned something to the variable "lyr" before your first example, so the window knows what "lyr" is. If it's a string and you type "lyr." it will give you a list of properties and methods available to strings (capitalize, center, count, etc.). If you start typing "mxd." in your second example, it knows mxd is a map document, so it gives you properties and methods available to a map document.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 15:55:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689425#M2285</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-06-06T15:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689426#M2286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe it would be object not method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 15:55:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689426#M2286</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-06-06T15:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689427#M2287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: mnakleh&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Objects in Python have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Methods (i.e. functions that do things.)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Attributes (i.e. properties of the object itself)&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;In your example, calling ListLayers returns a list of the layer objects of the MapDocument &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/"&gt;ArcGIS page on layer objects&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the attributes of this object is name. The object also has methods, like save (to save a layer file.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 17:07:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689427#M2287</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-06-06T17:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689428#M2288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks everyone.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an additional question, but not related terms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the code in this script it renames a legend element on the map. My question is what purpose does the [0] serve in making the code work/ what purpose does it serve? Please see image below for a clear picture of the issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]14995[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 19:53:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689428#M2288</guid>
      <dc:creator>SamanthaM</dc:creator>
      <dc:date>2012-06-06T19:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689429#M2289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: dkwiens&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*ahem* from &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ListLayoutElements/00s30000003w000000/"&gt;the help &lt;/A&gt;&lt;SPAN&gt;*ahem*&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;ListLayoutElements always returns a Python list object even if only one page element is returned. In order to return an element object, an index value must be used on the list (e.g., elm = arcpy.mapping.ListLayoutElements(mxd)[0]). &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;[0] means the first in the list (ie. an individual Layout Element object). If you leave it off, it returns a &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;list &lt;/SPAN&gt;&lt;SPAN&gt;of Layout Elements.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 20:01:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689429#M2289</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-06-06T20:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689430#M2290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks everyone.&lt;BR /&gt;&lt;BR /&gt;I have an additional question, but not related terms.&lt;BR /&gt;&lt;BR /&gt;For the code in this script it renames a legend element on the map. My question is what purpose does the [0] serve in making the code work/ what purpose does it serve? Please see image below for a clear picture of the issue. &lt;BR /&gt;&lt;BR /&gt;[ATTACH=CONFIG]14995[/ATTACH]&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The [0] assigns the first index value to the variable. Without that index reference there it returns a list instead of a single object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 20:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689430#M2290</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-06-06T20:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689431#M2291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: SamanthaM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;*ahem* from &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ListLayoutElements/00s30000003w000000/"&gt;the help &lt;/A&gt;*ahem*&lt;BR /&gt;&lt;BR /&gt;[0] means the first in the list (ie. an individual Layout Element object). If you leave it off, it returns a &lt;SPAN style="font-style:italic;"&gt;list &lt;/SPAN&gt;of Layout Elements.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry about that, I figured the help section of python within ArcGIS would display that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]14999[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 20:41:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689431#M2291</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-06-06T20:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python Terms Question</title>
      <link>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689432#M2292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It is often helpful to print variables before/after function calls.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Its an easy way to find errors.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2012 08:55:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/python-terms-question/m-p/689432#M2292</guid>
      <dc:creator>FabianBlau</dc:creator>
      <dc:date>2012-06-08T08:55:25Z</dc:date>
    </item>
  </channel>
</rss>

