Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'motivated': 0.05; 'builtin': 0.09; 'classes.': 0.09; 'here?': 0.09; 'patch.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tests,': 0.09; 'python': 0.11; 'jan': 0.12; 'bool': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 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; 'wrote:': 0.18; 'written': 0.21; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'case.': 0.24; 'mon,': 0.24; 'subject:/': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'idea': 0.28; 'leave': 0.29; 'am,': 0.29; 'patch': 0.29; "d'aprano": 0.31; 'steven': 0.31; 'class': 0.32; 'classes': 0.35; 'one,': 0.35; 'but': 0.35; 'there': 0.35; 'instances': 0.36; 'should': 0.36; 'two': 0.37; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'liked': 0.60; 'received:173': 0.61; 'skip:n 10': 0.64; 'decided': 0.64; 'subject:The': 0.64; 'here': 0.66; 'believe': 0.68; 'other.': 0.75; '10:32': 0.84; 'experiment': 0.84; 'pardon': 0.84; 'received:fios.verizon.net': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Jan Reedy Subject: Re: The type/object distinction and possible synthesis of OOP and imperative programming languages Date: Tue, 16 Apr 2013 12:49:01 -0400 References: <516bd241$0$29872$c3e8da3$5496439d@news.astraweb.com> <516C3C44.6010706@rece.vub.ac.be> <516cb85b$0$29977$c3e8da3$5496439d@news.astraweb.com> <516D14DA.5090406@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: <516D14DA.5090406@rece.vub.ac.be> 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366130955 news.xs4all.nl 2704 [2001:888:2000:d::a6]:55666 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43683 On 4/16/2013 5:07 AM, Antoon Pardon wrote: > Op 16-04-13 05:17, Terry Jan Reedy schreef: >> On 4/15/2013 10:32 PM, Steven D'Aprano wrote: >>> On Mon, 15 Apr 2013 20:52:58 -0400, Terry Jan Reedy wrote: >> >> I will keep the above in mind if I write or review a patch. here are 4 >> non-subclassable builtin classes. Two are already documented. Bool in >> one, forget which other. I believe it was recently decided to leave >> the other two as is given the absence of any practical use case. > > Why should there be a practical use case here? As a practical matter, the change is non-trivial. Someone has to be motivated to write the patch to enable subclassing, write tests, and consider the effect on internal C uses of slice and stdlib Python used of slice (type() versus isinstance). > Since classes are in general subclassable, if written in Python, but not if written in C. > I once had an idea of a slice-like class that I would have liked to > experiment with. Did the idea actually require that instances *be* a slice rather than *wrap* a slice? -- Terry Jan Reedy