Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.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.024 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; '16,': 0.03; 'try:': 0.09; 'builtins': 0.16; 'subject: \n ': 0.16; 'subject:OOP': 0.16; 'subject:object': 0.16; 'subject:possible': 0.16; 'subject:programming': 0.16; 'subject:type': 0.16; 'typeerror:': 0.16; '{})': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'pass': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; '"",': 0.31; 'file': 0.32; 'class': 0.32; '(most': 0.33; 'received:209.85': 0.35; 'except': 0.35; 'received:google.com': 0.35; 'acceptable': 0.36; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'our': 0.64; 'subject:The': 0.64; "'range'": 0.84; 'ethan': 0.84; 'furman': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=W51HfD3ke6DX0zWbDQk8b4BUbhF/pjkmLcnskuc4+3o=; b=GOCH5RILQLdaYdgBwwHY415njFLFj+yTFsOLG2+Ph7zISYEv1cvq5ynZ9qCGk8dGul nfMCbh4bFSWGLSj2TqAXupBUTIY+NSmGy6KbtUcWy/zt6tEWCo/MMG6r5Soq312y8LZW BX9zUuIvute284WbEhDLhwHqb1M7S4LlqsZxakSfjLopf7dW6vxlELTvwRDP/s/X6D8F HYNDS8oGDO+4iJoDDAHSz3aEw+rwPUGRM47X9Edf7L9kJCirsJ8oVwMtsVf3MBy4A1Er AYd1av/KP/h5CY8W0cmnNVDFs1QxjWQwQG6dF/epEnvL3ZixArNEpjCAcuEa5n1Nmt/H D4Xg== X-Received: by 10.66.250.230 with SMTP id zf6mr4684233pac.153.1366136604449; Tue, 16 Apr 2013 11:23:24 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <516D8A6E.6020002@stoneleaf.us> References: <516bd241$0$29872$c3e8da3$5496439d@news.astraweb.com> <516C3C44.6010706@rece.vub.ac.be> <516cb85b$0$29977$c3e8da3$5496439d@news.astraweb.com> <516D8A6E.6020002@stoneleaf.us> From: Ian Kelly Date: Tue, 16 Apr 2013 12:22:42 -0600 Subject: Re: The type/object distinction and possible synthesis of OOP and imperative programming languages To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366137037 news.xs4all.nl 2671 [2001:888:2000:d::a6]:52865 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43697 On Tue, Apr 16, 2013 at 11:29 AM, Ethan Furman wrote: >>> The four are bool, NoneType, slice and ellipsis, I believe. >> >> >> --> import builtins >> --> for n in dir(builtins): >> >> ... if type(getattr(builtins, n)) is type: >> ... try: >> ... t = type(n, (getattr(builtins, n),), {}) >> ... except TypeError as e: >> ... print(e) >> ... >> type 'bool' is not an acceptable base type >> type 'memoryview' is not an acceptable base type >> type 'range' is not an acceptable base type >> type 'slice' is not an acceptable base type > > > Well that bumps our count to five then: Six. >>> class test(type(...)): pass ... Traceback (most recent call last): File "", line 1, in TypeError: type 'ellipsis' is not an acceptable base type