Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'subject:Python': 0.05; 'type,': 0.07; 'creighton': 0.09; 'instance.': 0.09; 'python': 0.11; 'value.': 0.15; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'object()': 0.16; 'received:192.168.1.4': 0.16; 'sentinel': 0.16; 'typeof': 0.16; 'wrote:': 0.16; 'string': 0.17; 'integer': 0.18; 'laura': 0.18; 'versions': 0.20; 'saying': 0.22; 'suppose': 0.22; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'equivalent': 0.27; 'wonder': 0.27; 'subject:other': 0.29; 'subject:all': 0.32; 'null': 0.33; 'could': 0.35; 'to:addr:python-list': 0.35; 'acceptable': 0.35; 'exist': 0.35; 'instance': 0.35; 'replace': 0.35; 'sometimes': 0.35; 'should': 0.37; 'subject:: ': 0.37; 'doing': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'home': 0.67; 'discover': 0.73; 'subject:have': 0.80; "'object'": 0.84; 'subject:you': 0.88 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=ZuhjKrLG c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=QrohdLjRRo4A:10 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=x0ww1FF_SrpjWZfTFtkA:9 a=QEXdDO2ut3YA:10 X-AUTH: mrabarnett@:2500 Date: Fri, 22 May 2015 20:34:37 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Ah Python, you have spoiled me for all other languages References: <555f440a$0$12990$c3e8da3$5496439d@news.astraweb.com> <201505221914.t4MJE3e9009120@fido.openend.se> In-Reply-To: <201505221914.t4MJE3e9009120@fido.openend.se> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1432323282 news.xs4all.nl 2933 [2001:888:2000:d::a6]:58765 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91065 On 2015-05-22 20:14, Laura Creighton wrote: > The first time you discover that in javascript typeof(null) is 'object' and > not 'null' you will scream. I wonder how many home versions of typeof > to replace the system one exist out in the wild? > I don't think that typeof(null) should be 'null'. If the type of an integer instance is the integer type and the type of a string instance is the string type, then the type of null should be the null type, not a null instance. I suppose that you could consider that what JavaScript is doing is equivalent to saying in Python that: None = object() like you sometimes do when you want a unique sentinel because None itself would be an acceptable value.