Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python': 0.08; '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; 'none.': 0.09; 'received:gator410.hostgator.com': 0.09; 'subject:None': 0.09; '~ethan~': 0.09; 'thorough': 0.13; 'wrote:': 0.15; '(null,': 0.16; 'okay,': 0.16; 'subject:design': 0.16; 'subject:versus': 0.16; '(which': 0.20; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'gregory': 0.23; 'null': 0.23; 'subject: -- ': 0.25; 'character': 0.28; 'replaced': 0.29; 'times.': 0.30; 'ewing': 0.30; 'practices.': 0.30; 'compare': 0.31; 'values': 0.31; 'seem': 0.31; 'rather': 0.33; "i've": 0.33; 'to:addr:python-list': 0.34; 'header:User-Agent:1': 0.34; 'there': 0.34; 'however,': 0.34; 'things': 0.34; 'none': 0.35; 'project': 0.35; 'thank': 0.35; 'probably': 0.35; 'question': 0.35; 'equal': 0.35; 'supposed': 0.35; 'idea': 0.36; 'comparing': 0.37; 'date,': 0.37; 'some': 0.37; 'subject:: ': 0.38; 'something': 0.38; 'think': 0.38; 'common': 0.39; 'case': 0.39; 'to:addr:python.org': 0.39; 'dedicated': 0.62; 'back': 0.63; 'received:websitewelcome.com': 0.65; 'believe': 0.66; 'received:184': 0.67; 'received:69.93': 0.67; 'special': 0.67; 'learned': 0.73; 'question!': 0.84; 'received:69.93.164': 0.91 Date: Sat, 16 Jul 2011 17:31:06 -0700 From: Ethan Furman User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) 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> <98cb2oF3vpU1@mid.individual.net> In-Reply-To: <98cb2oF3vpU1@mid.individual.net> 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: c-67-170-168-84.hsd1.or.comcast.net ([192.168.74.5]) [67.170.168.84]:2258 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1310862722 news.xs4all.nl 23956 [2001:888:2000:d::a6]:50809 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9664 Gregory Ewing wrote: > Ethan Furman wrote: >> 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) > > That doesn't seem like a good idea to me. It's common practice > to use 'is' rather than '==' when comparing things to None. > > Why do you want to use special null values for these types? Okay, after spending some time thinking about this question I don't believe I have a good answer. I think it was probably something I thought of back when I started this project (which is basically what I learned Python on) and I've since learned enough that whatever reason I had back then has been replaced with more thorough knowledge and better practices. The best reason I have at this point is being able to know what the Null value is supposed to represent -- True/False, a Date, etc. -- however, even that is weakened by my decision to use None for Null in the case of Character and Numerics; so there is probably no reason to not use None in the case of Logicals, Dates, DateTimes, and Times. Thank you for the question! ~Ethan~