<?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 won't recognize NULL (or None) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499643#M39242</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Had this issue too... here's how got around it...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Expression: TestForNullOrEmpty(str(!FieldA!))

Code Block: 
def TestForNullOrEmpty(fieldVal):
&amp;nbsp; if len(fieldVal.strip()) == 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "FieldValueWasNullOrEmpty"
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "FieldHadSomethingInItAlready"

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The trick is to put&amp;nbsp;&amp;nbsp; str(!FieldA!)&amp;nbsp;&amp;nbsp;&amp;nbsp; in as your parameter in the Expression, this will convert a Null or None value to an empty string.&amp;nbsp;&amp;nbsp; Then by testing the length of the fieldVal that you passed and adding on the .strip()&amp;nbsp; you can then filter out all 3 of this scenarios with this code...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Field Value is Null (or None)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Field Value is empty string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Field Value is empty string but has some spaces in it (shouldn't happen but it does...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note however, that this code will not be capable of picking out "Only Null Values", because this code will treat Null's and Empty String as the same thing...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JMiller&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:56:45 GMT</pubDate>
    <dc:creator>JasonMiller</dc:creator>
    <dc:date>2021-12-11T21:56:45Z</dc:date>
    <item>
      <title>Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499637#M39236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Trying to calculate a field based on another field. Want to give Contiguous a "Y" where Contig_ID is not NULL.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Calculate Field for Contiguous"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Field Name: Contiguous&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Expression: Answer(!Contig_ID!)

Code Block: 
def Answer(CI):
&amp;nbsp; if CI ==None:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "N"
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Y"&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've read plenty of posts explaining that NULL == None in python, but this code only returns Y for all numeric values in Contig_ID. Where Contig_ID == Null, no values are returned to Contiguous.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be grand!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2011 20:11:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499637#M39236</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2011-09-26T20:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499638#M39237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After some extensive testing, I can confirm this behaviour. If any of the inputs are &amp;lt;NULL&amp;gt;, it won't calculate for that row... Even when you get the row to calculate on itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is weird though, as I'm sure I have done this before in Arc!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An annoying workaround would be to make a selection by attributes where Contig_ID IS NULL, set that to a marker value (i.e. 99999) and use that in your second calculation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Expression: Answer(!Contig_ID!)

Code Block: 
def Answer(CI):
&amp;nbsp; if CI == 99999: # or '99999' if string...
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "N"
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Y"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let's hope the ESRI guys have an answer!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:56:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499638#M39237</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2021-12-11T21:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499639#M39238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Stacy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Indeed, I am hopeful as well. Unfortunately, the null values are an indicator within the dataset that the client desires to maintain. Assigning another numeric value (0 or 999999) could potentially create miscalculations down the road. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Not to mention the messiness of creating a layer, selecting, and calculating a field based on data that are already present.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are going to wait on this to hear if there is a solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 14:39:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499639#M39238</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2011-09-27T14:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499640#M39239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;75 people have viewed this thread. Has anyone else had any success in ArcGIS10 calculating a field in python based on a null value??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At the least, maybe this fix will make into SP3 due out next month?!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 16:49:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499640#M39239</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2011-09-29T16:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499641#M39240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Only successful test I found was using a searchcursor, not field calculator. Null values must be read as something else in field calculator, because they come back as value True.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 17:57:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499641#M39240</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-09-29T17:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499642#M39241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Richard,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've definitely been able to reproduce your issue and don't know what's going on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the task you have in mind could be done trivially using Select by Attribute, followed by a standard Field Calculator expression.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In a Python script or in the Python window, it would be as simple as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;expr = '"&lt;SPAN style="color:&amp;quot;blue&amp;quot;;"&gt;REFERENCE_FIELD&lt;/SPAN&gt;" IS NULL'
arcpy.MakeFeatureLayer_management('&lt;SPAN style="color:&amp;quot;blue&amp;quot;;"&gt;FEATURE_CLASS_NAME&lt;/SPAN&gt;', 'temp', expr)
arcpy.CalculateField_management('temp', '&lt;SPAN style="color:&amp;quot;blue&amp;quot;;"&gt;CALCULATED_FIELD&lt;/SPAN&gt;', VALUE)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't have the exact figures, but this approach was &lt;/SPAN&gt;&lt;STRONG&gt;significantly&lt;/STRONG&gt;&lt;SPAN&gt; faster than comparing values one at a time through an unfiltered Update Cursor (and, by extension the way I understand it, any call to an CalculateField Python script.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Doesn't change the fact that you're definitely pointing out some very weird behaviour that should be fixed!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem NIM070782 listed for &lt;/SPAN&gt;&lt;A href="http://downloads.esri.com/support/documentation/ao_/10.0_SP3_Announcement.pdf" rel="nofollow noopener noreferrer" target="_blank"&gt;Service Pack 3&lt;/A&gt;&lt;SPAN&gt; might be this, but I'm not quite sure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you don't get a response from ESRI or someone knowledgeable in the next while, I'd recommend posting it on &lt;/SPAN&gt;&lt;A href="http://ideas.arcgis.com" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Ideas&lt;/A&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an aside, I believe that the proper format should always be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG style="font-style: italic;"&gt;foo is None&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;and not &lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG style="font-style: italic;"&gt;foo == None&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;because of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt; &lt;BR /&gt; &lt;LI&gt;back-end optimization (which is also sadly why &lt;SPAN style="font-style:italic;"&gt;while 1&lt;/SPAN&gt; is preferred over &lt;SPAN style="font-style:italic;"&gt;while True&lt;/SPAN&gt;); and&lt;/LI&gt; &lt;BR /&gt; &lt;LI&gt;the ability to overload an operator in classes and change the default behaviour of an &lt;SPAN style="font-style:italic;"&gt;==&lt;/SPAN&gt; comparison.&lt;/LI&gt; &lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt;It's no biggie, but worth pointing out. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Marc&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:56:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499642#M39241</guid>
      <dc:creator>MarcNakleh</dc:creator>
      <dc:date>2021-12-11T21:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499643#M39242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Had this issue too... here's how got around it...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Expression: TestForNullOrEmpty(str(!FieldA!))

Code Block: 
def TestForNullOrEmpty(fieldVal):
&amp;nbsp; if len(fieldVal.strip()) == 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "FieldValueWasNullOrEmpty"
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "FieldHadSomethingInItAlready"

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The trick is to put&amp;nbsp;&amp;nbsp; str(!FieldA!)&amp;nbsp;&amp;nbsp;&amp;nbsp; in as your parameter in the Expression, this will convert a Null or None value to an empty string.&amp;nbsp;&amp;nbsp; Then by testing the length of the fieldVal that you passed and adding on the .strip()&amp;nbsp; you can then filter out all 3 of this scenarios with this code...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Field Value is Null (or None)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Field Value is empty string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Field Value is empty string but has some spaces in it (shouldn't happen but it does...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note however, that this code will not be capable of picking out "Only Null Values", because this code will treat Null's and Empty String as the same thing...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JMiller&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:56:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499643#M39242</guid>
      <dc:creator>JasonMiller</dc:creator>
      <dc:date>2021-12-11T21:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499644#M39243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All this solutions will work if you are on a edit session. You must Start editing the feature for the code to replace the value.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 14:36:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499644#M39243</guid>
      <dc:creator>LuisFragoso</dc:creator>
      <dc:date>2018-03-16T14:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499645#M39244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not&amp;nbsp;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;CI:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;I was testing for None for Null field -- i.e.&amp;nbsp; &amp;nbsp;if CI == 'None' for field returned with UpdateCursor&lt;BR /&gt;&lt;BR /&gt;Even though a print statement returned 'None', couldn't be tested for as above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;if not ___&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;seems to work fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 15:40:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499645#M39244</guid>
      <dc:creator>BarryHall</dc:creator>
      <dc:date>2019-07-23T15:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499646#M39245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When cursors encounter NULL they return &lt;CODE&gt;None&lt;/CODE&gt; and not &lt;CODE&gt;'None'&lt;/CODE&gt;, which is a very important distinction.&amp;nbsp; The former is &lt;EM&gt;the&lt;/EM&gt; Python None object while the latter is simply a string with the word None.&amp;nbsp; The expression &lt;CODE&gt;CI == 'None'&lt;/CODE&gt; will never evaluate true for cursors returning fields with NULL. The proper way to check for a NULL field with cursors is &lt;CODE&gt;CI is None&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 16:05:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499646#M39245</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-07-23T16:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499647#M39246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joshua -- many thanks -- I am a Python newbie -- does the Python None object equate to false in logical tests?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 16:21:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499647#M39246</guid>
      <dc:creator>BarryHall</dc:creator>
      <dc:date>2019-07-23T16:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499648#M39247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, see &lt;A class="" href="https://docs.python.org/2.4/lib/truth.html" title="https://docs.python.org/2.4/lib/truth.html"&gt;2.3.1 Truth Value Testing&lt;/A&gt; .&amp;nbsp; Since there are several other data structures that exhibit falsy behavior, e.g., an empty string, testing for false instead of for None might result in some non-NULL fields getting treated as NULL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 16:30:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499648#M39247</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-07-23T16:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499649#M39248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why is an individual field attribute an object (re:Null is returning as a Python&amp;nbsp; None object)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 14:36:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499649#M39248</guid>
      <dc:creator>BarryHall</dc:creator>
      <dc:date>2019-07-25T14:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Python won't recognize NULL (or None)</title>
      <link>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499650#M39249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anything returned from any field in a cursor is a Python object because all data types are fundamentally objects:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; lst = [int(), float(), str(), bool(), None]&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; for obj in lst:&lt;BR /&gt;...&amp;nbsp;&amp;nbsp; print(isinstance(obj, object))&lt;BR /&gt;...&lt;BR /&gt;True&lt;BR /&gt;True&lt;BR /&gt;True&lt;BR /&gt;True&lt;BR /&gt;True&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In terms of why NULL gets returned as None; well, None is the closest data type conceptually to SQL NULL:&amp;nbsp; &lt;A class="link-titled" href="https://docs.python.org/3/library/constants.html" title="https://docs.python.org/3/library/constants.html"&gt;Built-in Constants — Python 3.7.4 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;CODE class="" style="background-color: transparent; padding: 0px 1px; font-size: 19.2px; font-family: monospace, sans-serif; font-weight: bold; border-radius: 3px;"&gt;None&lt;/CODE&gt;&lt;/P&gt;&lt;P style="margin-top: 0px; text-align: justify; line-height: 22.4px;"&gt;The sole value of the type&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;NoneType&lt;/SPAN&gt;&lt;/CODE&gt;.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;None&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is frequently used to represent the absence of a value, as when default arguments are not passed to a function.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 15:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-won-t-recognize-null-or-none/m-p/499650#M39249</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-07-25T15:47:28Z</dc:date>
    </item>
  </channel>
</rss>

