<?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: Run script with ArcGIS Pro (arcpy) installation and without --&amp;gt; different results syntax in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793985#M1706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regarding your "PS," dare to dream, and I mean that in all seriousness.&amp;nbsp; Esri doesn't even host the code for the API on GitHub, it is just a glorified check box, "we're on GitHub, check."&amp;nbsp; The GitHub page isn't even accurate, in terms of its terminology, i.e., the API is "ArcGIS API for Python" and not "ArcGIS Python API."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At a minimum, I think this is a documentation defect.&amp;nbsp; The documentation simply states:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;CODE class="" style="box-sizing: border-box; font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', 'Lucida Sans Typewriter', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Liberation Mono', 'Nimbus Mono L', Monaco, 'Courier New', Courier, monospace; font-size: 14.4px; white-space: nowrap; max-width: 100%; background: transparent; border: none; padding: 0px; color: #000000; overflow-x: auto; font-weight: bold;"&gt;extent&lt;/CODE&gt;&lt;/P&gt;&lt;P style="box-sizing: border-box; line-height: 24px; font-size: 16px; margin: 0px 0px 12px !important 0px;"&gt;The extent of the geometry.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Sufficiently vague, it doesn't say an extent object is being returned, but it also doesn't say a tuple of values is being returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beyond the documentation being incomplete, I do think there is a larger code issue.&amp;nbsp; If someone wants an ArcPy Extent object, I think they should be explicit about it and use:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;polygon&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;as_arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the &lt;A class="link-titled" href="https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm" title="https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm"&gt;Geometry objects—Common Data Types | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; documentation addresses this better:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;H2 style="font-weight: 300; font-style: normal; margin: 0px 0px 1.55rem; font-size: 1.9994rem; line-height: 2.325rem; color: #4c4c4c; font-family: 'Avenir Next W01', 'Avenir Next W00', 'Avenir Next', Avenir, 'Helvetica Neue', sans-serif; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Envelope&lt;/H2&gt;&lt;P style="margin-top: 0px; margin-bottom: 1.55rem; color: #4c4c4c; font-family: 'Avenir Next W01', 'Avenir Next W00', 'Avenir Next', Avenir, 'Helvetica Neue', sans-serif; font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;An envelope is a rectangle defined by a range of values for each coordinate and attribute. It also has a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="white-space: normal; background-color: #f8f8f8; border-width: 1px 0px 1px 1px; border-style: solid none solid solid; border-image: initial; border-radius: 3px; color: #595959; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 0.85em; line-height: 1.4rem; padding: 0.25rem 0px 0.25rem 0.25rem; border-color: #efefef initial #efefef #efefef;"&gt;spatialReference&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field. The fields for the z and m ranges are optional. An empty envelope has no location in space and is defined by the presence of an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="white-space: normal; background-color: #f8f8f8; border-width: 1px 0px; border-style: solid none; border-image: initial; border-radius: 3px; color: #595959; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 0.85em; line-height: 1.4rem; padding: 0.25rem 0px; border-color: #efefef initial #efefef initial;"&gt;xmin&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field, a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="white-space: normal; background-color: #f8f8f8; border-width: 1px 0px; border-style: solid none; border-image: initial; border-radius: 3px; color: #595959; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 0.85em; line-height: 1.4rem; padding: 0.25rem 0px; border-color: #efefef initial #efefef initial;"&gt;null&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value, or a "NaN" string.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Overall, I agree with you, whether the ArcGIS API for Python team does remains to be seen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 Feb 2018 14:26:32 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2018-02-18T14:26:32Z</dc:date>
    <item>
      <title>Run script with ArcGIS Pro (arcpy) installation and without --&gt; different results syntax</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793980#M1701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If a script runs in an environment with ArcGIS Pro (arcpy) or in environment without the results are different. The "extent" result is ones an array and the other one is a string with all values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; Polygon
gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
webmap_search &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'title:"World Regions" AND owner:esri'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item_type &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Feature Layer Collection'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
layer_region &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; webmap_search&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
query_result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; layer_region&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;query&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;where&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"REGION='Western Europe'"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
selected_region &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; query_result&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; Polygon
polygon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Polygon&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="string token"&gt;"rings"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; selected_region&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'rings'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="string token"&gt;"spatialReference"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"wkid"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3857&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
extent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; polygon&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Result WITHOUT arcpy:
(-533252.171281941, 5066318.40606212, 1910953.15492337, 7372844.99872111)

Result WITH arcpy (ArcGIS Pro):
&lt;PRE class="lia-code-sample line-numbers language-none"&gt;-533252.171281941 5066318.40606212 1910953.15492337 7372844.99872111 NaN NaN NaN NaN

This behavior is difficult if you would like to use the same script in different environment.&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:08:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793980#M1701</guid>
      <dc:creator>GISMountains</dc:creator>
      <dc:date>2021-12-12T09:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Run script with ArcGIS Pro (arcpy) installation and without --&gt; different results syntax</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793981#M1702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a branching in the ArcGIS environment based on whether arcmap or pro is installed.&amp;nbsp; You would have to examine the actual code to find what is returned in those situations.&amp;nbsp; I think the arcmap/ArcGIS pro environment returns an arcpy Polygon object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the type of code line you are looking for in the module you are interested in (an example from one function&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;__geo_interface__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"""returns the object as an Feature Collection JSON string"""&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; HASARCPY
&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:08:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793981#M1702</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T09:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Run script with ArcGIS Pro (arcpy) installation and without --&gt; different results syntax</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793982#M1703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes this I found too:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;@property
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;extent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"""
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The extent of the geometry.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; """&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptX &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptY &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; HASARCPY&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; getattr&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;as_arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"extent"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;elif&lt;/SPAN&gt; isinstance&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Polygon&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; pts &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'rings'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; part &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; pts&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptX&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;part&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptY&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;part&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; min&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ptX&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; min&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ptY&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; max&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ptX&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; max&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ptY&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But you agree that if you write a function the answer should always syntacticly be the same?&amp;nbsp; Or what I am missing?&lt;/P&gt;&lt;P&gt;Otherwise we need to program outside a checker and interpreter of the results: if arcpy is installed interpret the results different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:08:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793982#M1703</guid>
      <dc:creator>GISMountains</dc:creator>
      <dc:date>2021-12-12T09:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Run script with ArcGIS Pro (arcpy) installation and without --&gt; different results syntax</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793983#M1704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would simply check the returned object to see whether it was a list/tuple or 4 individual values, from there you can determine what to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a tuple is returned you can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if isinstance(someobject, (list, tuple)):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; .... then parse the contents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no expectation that esri completely replicate what can and can't be done within all environments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The HASARCPY I would expect an 'extent' object to be returned, since that is what I expect.&lt;/P&gt;&lt;P&gt;If there is no arcpy, then it is totally reasonable that 4 values be returned... they could have returned a tuple/list, but I can exploit the fact&lt;/P&gt;&lt;P&gt;that they didn't to differentiate between the two environments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are working with your own code base, then you should incorporate your own HASARCPY checks, which you can see in the code base&lt;/P&gt;&lt;P&gt;is simple to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Feb 2018 13:51:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793983#M1704</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-02-18T13:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Run script with ArcGIS Pro (arcpy) installation and without --&gt; different results syntax</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793984#M1705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;Yes it is possible to do this in the script who use the "ArcGIS API for Python". But it was some kind of frustrating to use this great library&amp;nbsp;to create some geometry-stuff and it worked in an environment and in the other environment it does not work, after some time debugging you can find the answer..... But not in the documentation, or?&lt;/P&gt;&lt;P&gt;On the other hand it would really helpful if the answer is&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;syntactically&lt;SPAN&gt;&amp;nbsp; the same.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Feb 2018 14:08:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793984#M1705</guid>
      <dc:creator>GISMountains</dc:creator>
      <dc:date>2018-02-18T14:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Run script with ArcGIS Pro (arcpy) installation and without --&gt; different results syntax</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793985#M1706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regarding your "PS," dare to dream, and I mean that in all seriousness.&amp;nbsp; Esri doesn't even host the code for the API on GitHub, it is just a glorified check box, "we're on GitHub, check."&amp;nbsp; The GitHub page isn't even accurate, in terms of its terminology, i.e., the API is "ArcGIS API for Python" and not "ArcGIS Python API."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At a minimum, I think this is a documentation defect.&amp;nbsp; The documentation simply states:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;CODE class="" style="box-sizing: border-box; font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', 'Lucida Sans Typewriter', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Liberation Mono', 'Nimbus Mono L', Monaco, 'Courier New', Courier, monospace; font-size: 14.4px; white-space: nowrap; max-width: 100%; background: transparent; border: none; padding: 0px; color: #000000; overflow-x: auto; font-weight: bold;"&gt;extent&lt;/CODE&gt;&lt;/P&gt;&lt;P style="box-sizing: border-box; line-height: 24px; font-size: 16px; margin: 0px 0px 12px !important 0px;"&gt;The extent of the geometry.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Sufficiently vague, it doesn't say an extent object is being returned, but it also doesn't say a tuple of values is being returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beyond the documentation being incomplete, I do think there is a larger code issue.&amp;nbsp; If someone wants an ArcPy Extent object, I think they should be explicit about it and use:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;polygon&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;as_arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the &lt;A class="link-titled" href="https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm" title="https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm"&gt;Geometry objects—Common Data Types | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; documentation addresses this better:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;H2 style="font-weight: 300; font-style: normal; margin: 0px 0px 1.55rem; font-size: 1.9994rem; line-height: 2.325rem; color: #4c4c4c; font-family: 'Avenir Next W01', 'Avenir Next W00', 'Avenir Next', Avenir, 'Helvetica Neue', sans-serif; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Envelope&lt;/H2&gt;&lt;P style="margin-top: 0px; margin-bottom: 1.55rem; color: #4c4c4c; font-family: 'Avenir Next W01', 'Avenir Next W00', 'Avenir Next', Avenir, 'Helvetica Neue', sans-serif; font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;An envelope is a rectangle defined by a range of values for each coordinate and attribute. It also has a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="white-space: normal; background-color: #f8f8f8; border-width: 1px 0px 1px 1px; border-style: solid none solid solid; border-image: initial; border-radius: 3px; color: #595959; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 0.85em; line-height: 1.4rem; padding: 0.25rem 0px 0.25rem 0.25rem; border-color: #efefef initial #efefef #efefef;"&gt;spatialReference&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field. The fields for the z and m ranges are optional. An empty envelope has no location in space and is defined by the presence of an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="white-space: normal; background-color: #f8f8f8; border-width: 1px 0px; border-style: solid none; border-image: initial; border-radius: 3px; color: #595959; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 0.85em; line-height: 1.4rem; padding: 0.25rem 0px; border-color: #efefef initial #efefef initial;"&gt;xmin&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field, a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="white-space: normal; background-color: #f8f8f8; border-width: 1px 0px; border-style: solid none; border-image: initial; border-radius: 3px; color: #595959; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 0.85em; line-height: 1.4rem; padding: 0.25rem 0px; border-color: #efefef initial #efefef initial;"&gt;null&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value, or a "NaN" string.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Overall, I agree with you, whether the ArcGIS API for Python team does remains to be seen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Feb 2018 14:26:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-script-with-arcgis-pro-arcpy-installation-and/m-p/793985#M1706</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-02-18T14:26:32Z</dc:date>
    </item>
  </channel>
</rss>

