Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'thread,': 0.04; 'value,': 0.04; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'none)': 0.09; 'received:gator410.hostgator.com': 0.09; 'subject:None': 0.09; '~ethan~': 0.09; 'wrote:': 0.15; '(null,': 0.16; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'subject:design': 0.16; 'subject:versus': 0.16; 'header:In-Reply-To:1': 0.22; 'null': 0.23; 'numeric': 0.23; 'interface': 0.23; 'subject: -- ': 0.25; "i'm": 0.27; 'compare': 0.31; 'values': 0.31; "i'll": 0.33; 'anyone': 0.33; "i've": 0.33; 'to:addr:python-list': 0.34; 'header :User-Agent:1': 0.34; 'none': 0.35; 'that,': 0.35; 'explicit': 0.35; 'probably': 0.35; 'question': 0.35; 'equal': 0.35; 'help,': 0.35; 'date,': 0.37; 'some': 0.37; 'but': 0.37; 'subject:: ': 0.38; 'returning': 0.38; 'steven': 0.38; 'something': 0.38; 'think': 0.38; 'put': 0.38; 'case': 0.39; 'should': 0.39; 'returned': 0.39; 'to:addr:python.org': 0.39; 'missing': 0.40; 'choose': 0.61; 'dedicated': 0.62; 'received:websitewelcome.com': 0.65; 'received:184': 0.67; 'different.': 0.84; 'received:gateway15.websitewelcome.com': 0.84 Date: Fri, 15 Jul 2011 10:18:28 -0700 From: Ethan Furman User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: python-list@python.org Subject: Re: None versus MISSING sentinel -- request for design feedback References: <4e1fd009$0$29986$c3e8da3$5496439d@news.astraweb.com> <4e201a9d$0$29989$c3e8da3$5496439d@news.astraweb.com> <4e203706$0$29972$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: mail.admailinc.com ([192.168.10.136]) [72.11.125.166]:4890 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 1 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1310749444 news.xs4all.nl 23839 [2001:888:2000:d::a6]:50450 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9557 Mel wrote: > Steven D'Aprano wrote: > >> Well yes, but None is an explicit missing value too. The question I have >> is if I should support None as that value, or something else. Or if anyone >> can put a good case for it, both, or neither and so something completely >> different. > > If it's any help, I think (some of?) the database interface packages already > do just that, returning None when they find NULL fields. Indeed. I'm adding Null support to my dbf package now, and while some of the return values (Logical, Date, DateTime, and probably Character) will have their own dedicated singletons (Null, NullDate, NullDateTime, NullChar -- which will all compare equal to None) the numeric values will be None... although, now that I've seen this thread, I'll add the ability to choose what the numeric Null is returned as. ~Ethan~