Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #90327
| Path | csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'handler': 0.05; 'remind': 0.05; 'elegant': 0.07; 'float': 0.07; 'string': 0.09; 'elegant,': 0.09; 'integers': 0.09; 'lst': 0.09; 'methods,': 0.09; 'objects:': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'stored': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'keyword.': 0.16; 'lambda': 0.16; 'lisp': 0.16; 'operators,': 0.16; 'rules.': 0.16; 'str()': 0.16; 'subclass': 0.16; 'java,': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'things.': 0.19; 'rules': 0.22; 'cc:addr:python.org': 0.22; 'integer': 0.24; 'helpful': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'direction': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'object.': 0.31; 'maybe': 0.34; 'problem': 0.35; 'objects': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'done': 0.36; 'possible': 0.36; 'should': 0.36; 'two': 0.37; 'list': 0.37; 'being': 0.38; 'generic': 0.38; 'anything': 0.39; 'does': 0.39; 'extremely': 0.39; 'either': 0.39; 'according': 0.40; 'how': 0.40; 'simple': 0.61; 'making': 0.63; 'name': 0.63; 'different': 0.65; '2015': 0.84; 'around,': 0.84; 'etc,': 0.84; 'hammered': 0.84; 'object:': 0.84; 'to:none': 0.92 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=/NXBuJmDzEXu7nPh6WL9b6FPSx9JkFg/mWMikyTxe2s=; b=UNSKk5nyKH/F+9jaaixwL+nZGSLLc8pJrK61BRbVFtUKpwCVn20x74S9O7jrtJLAXT n0N1z1Xw3gUcwQ35tei1ggsvQqpXBTnao2dhzzJdGzdM9d495M19OyeyIcv40KU8vly7 Qe4RUrJHYRSlqMiSCg7urUNw2cnHTSeeM8nVLjQ2hcDKXOguZPEQ1wWlwrtaUGObP/wT kgMhffQ+i+yCOxKT7S4o/fbLN3CfVS3Nyk7914Eg3Dr4gM4ODWg9g+2l1h7zM48qYxEk C4rXiDv/T3hGv/fWmyFb+uRKWWP7TFFCvtSJwW19XhB1BrcQMfdfZ1HjmH2davs66NzG jRow== |
| MIME-Version | 1.0 |
| X-Received | by 10.107.16.32 with SMTP id y32mr10015644ioi.53.1431309204289; Sun, 10 May 2015 18:53:24 -0700 (PDT) |
| In-Reply-To | <ad8dd792-a236-4514-9bb5-a90cf21535a4@googlegroups.com> |
| References | <CAMjeLr--RfnfgWc1hdOcHiEBpq3QwC7SZk-m14wM65JtpbgMLQ@mail.gmail.com> <mailman.318.1431276220.12865.python-list@python.org> <7169d38e-b21c-472e-b0e3-544ed37fbfd2@googlegroups.com> <mailman.331.1431306462.12865.python-list@python.org> <ad8dd792-a236-4514-9bb5-a90cf21535a4@googlegroups.com> |
| Date | Mon, 11 May 2015 11:53:24 +1000 |
| Subject | Re: anomaly |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.334.1431309212.12865.python-list@python.org> (permalink) |
| Lines | 29 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1431309212 news.xs4all.nl 2918 [2001:888:2000:d::a6]:51914 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:90327 |
Show key headers only | View raw
On Mon, May 11, 2015 at 11:18 AM, zipher <dreamingforward@gmail.com> wrote:
> Okay. I apologize for thinking in C and believing "int" was a keyword. It isn't in Python as you remind me. However, this is where I'm arguing the purity has hammered practicality into the ground.
>
> Python is trying to be as elegant as LISP in trying to make everything an Object. It's not necessary, and it's trying to put lipstick on a pig instead of making BBQ. Python will be as elegant, but in a different direction of the axis.
>
How is it a problem for an integer to be an object? In Python, I can
put together a generic handler for a generic list and depend on
everything being an object:
lst = ["asdf", 2, lambda x: x+1, re.compile("q[a-tv-z]"), 3.14159]
In Java, I would have to box up that integer 2 and that float 3.14159
(and maybe the string too?) to make it possible to put them into a
generic collection, because integers and objects are fundamentally
different things. In Python, ints and floats and strings all follow
the same rules as other objects: they can be passed around, stored in
collections, turned into strings with str() or repr(), etc, etc, etc.
They have methods, they react to operators, everything is done
according to a simple set of rules. This does not harm practicality -
it's extremely helpful in a number of situations.
And I still don't see how this has anything to do with your confusion
about shadowing the name 'int'. As I see it, attempting to redefine
int to be a null subclass of str should have one of two results:
either it's a straight-up error, or it does exactly what happens in
Python - calling 'int' now calls a subclass of 'str'.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: anomaly Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-10 10:42 -0600
Re: anomaly Rustom Mody <rustompmody@gmail.com> - 2015-05-10 09:48 -0700
Re: anomaly Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-10 18:21 +0100
Re: anomaly Gary Herron <gherron@digipen.edu> - 2015-05-10 10:28 -0700
Re: anomaly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-11 13:19 +1000
Re: anomaly boB Stepp <robertvstepp@gmail.com> - 2015-05-10 14:12 -0500
Re: anomaly Mel Wilson <mwilson@the-wire.com> - 2015-05-11 13:37 +0000
Re: anomaly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-12 02:35 +1000
Re: anomaly Mel Wilson <mwilson@the-wire.com> - 2015-05-11 20:48 +0000
Re: anomaly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-12 12:18 +1000
Re: anomaly Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-11 08:40 +0100
Re: anomaly Chris Angelico <rosuav@gmail.com> - 2015-05-11 17:44 +1000
Re: anomaly Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-05-11 12:15 +0200
Re: anomaly John Ladasky <john_ladasky@sbcglobal.net> - 2015-05-12 17:47 -0700
Re: anomaly Rustom Mody <rustompmody@gmail.com> - 2015-05-12 17:56 -0700
Re: anomaly Paul Rubin <no.email@nospam.invalid> - 2015-05-12 19:16 -0700
Re: anomaly Rustom Mody <rustompmody@gmail.com> - 2015-05-12 19:31 -0700
Re: anomaly Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-11 11:40 +0100
Re: anomaly Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-05-11 13:39 +0200
Re: anomaly Marko Rauhamaa <marko@pacujo.net> - 2015-05-11 14:58 +0300
Re: anomaly Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-05-11 15:27 +0200
Re: anomaly Marko Rauhamaa <marko@pacujo.net> - 2015-05-11 17:03 +0300
Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-11 07:56 -0700
Re: anomaly Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-05-11 20:32 -0400
Re: anomaly Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-05-12 13:34 +0200
Re: anomaly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-12 01:44 +1000
Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-11 09:17 -0700
Re: anomaly Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-05-11 20:33 -0400
Re: anomaly Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-05-12 14:31 +0200
Re: anomaly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-11 22:34 +1000
Re: anomaly Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-05-11 15:38 +0200
Re: anomaly Chris Angelico <rosuav@gmail.com> - 2015-05-12 00:13 +1000
Re: anomaly Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-05-12 17:37 +1200
Re: anomaly Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-05-12 13:55 +0200
Re: anomaly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-12 23:56 +1000
Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-12 08:34 -0700
Re: anomaly Chris Angelico <rosuav@gmail.com> - 2015-05-13 01:43 +1000
Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-12 20:39 -0700
Re: anomaly Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-12 17:19 +0100
Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-13 08:19 -0700
Re: anomaly Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-12 11:22 -0500
Re: anomaly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-13 13:58 +1000
Re: anomaly Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-12 12:07 -0600
Re: anomaly Terry Reedy <tjreedy@udel.edu> - 2015-05-12 16:23 -0400
Re: anomaly Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-05-13 09:07 +0200
Re: anomaly Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-05-13 12:19 +1200
Re: anomaly Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-05-13 09:23 +0200
Re: anomaly Gary Herron <gherron@digipen.edu> - 2015-05-12 09:07 -0700
Re: anomaly Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-11 12:47 +0100
Re: anomaly boB Stepp <robertvstepp@gmail.com> - 2015-05-11 07:43 -0500
Re: anomaly boB Stepp <robertvstepp@gmail.com> - 2015-05-11 07:26 -0500
Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-10 17:48 -0700
Re: anomaly Gary Herron <gherron@digipen.edu> - 2015-05-10 18:07 -0700
Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-10 18:18 -0700
Re: anomaly Chris Angelico <rosuav@gmail.com> - 2015-05-11 11:53 +1000
Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-10 19:09 -0700
Re: anomaly Rustom Mody <rustompmody@gmail.com> - 2015-05-10 19:12 -0700
Re: anomaly Chris Angelico <rosuav@gmail.com> - 2015-05-11 12:20 +1000
Re: anomaly BartC <bc@freeuk.com> - 2015-05-11 12:55 +0100
csiph-web