Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #90355
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <robertvstepp@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.038 |
| X-Spam-Evidence | '*H*': 0.92; '*S*': 0.00; 'python,': 0.02; 'class,': 0.07; '*is*': 0.09; 'builtin': 0.09; 'defines': 0.09; 'override': 0.09; 'python': 0.11; 'creates': 0.14; 'thread': 0.14; 'expecting': 0.16; 'namespace,': 0.16; 'python",': 0.16; 'subclass': 0.16; 'essential': 0.16; 'language': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'basically': 0.19; 'normally': 0.19; 'things.': 0.19; '>>>': 0.22; 'python?': 0.22; 'equivalent': 0.26; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'too.': 0.31; 'you?': 0.31; '>>>>': 0.31; 'gary': 0.31; 'class': 0.32; 'languages': 0.32; 'classes': 0.35; 'common': 0.35; 'something': 0.35; 'done.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'keyword': 0.36; 'doing': 0.36; 'wrong': 0.37; 'being': 0.38; 'to:addr:python- list': 0.38; 'list,': 0.38; 'pm,': 0.38; 'realize': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'ian': 0.60; 'new': 0.61; 'act': 0.63; 'such': 0.63; 'interest': 0.64; 'more': 0.64; 'different': 0.65; 'within': 0.65; 'hang': 0.67; 'family': 0.73; 'hoping': 0.75; "'3'": 0.84; '2015': 0.84; 'mindset': 0.84; 'studying': 0.84; 'understand,': 0.84; 'discovering': 0.91; 'here."': 0.91; 'str.': 0.91 |
| 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:to :content-type; bh=9p5tX60dcNkR2jUFrMBCqCBZoPJY8GwYtlOqB1NxTuw=; b=rUvkPOXTLPBbJWwRVvsY53mwyZYMjvgCVlviSwQzjy+AoRg7dt3NltsKt2i2UAJKsL 2W2SXEGREpVXRVbeiQgU+DB3Vgq0nmEBnJRFfVsRbWqrbFmcKA9/QC8OWrIRINoBZtle lYoiTOl9ZuxazfKRN29CA7GvD09IoqGhsB5vuC00il23zwTazolQkNWzvmPlB7ZGApf3 13l1fASZ9Y2ZFJlHRlxxz5A1CYAglJ/JXYUhMdsogP4ipmQMoVgGizoJZOhelMPtY8Ct aZQq1gnvPFoiJ9RQGZPuoWDI0Ae55MdAtuTO/JUNDvPgQeJRS3mZUxLzUjj8Eq1h4rHY cBAw== |
| MIME-Version | 1.0 |
| X-Received | by 10.140.129.65 with SMTP id 62mr9788081qhb.102.1431285164922; Sun, 10 May 2015 12:12:44 -0700 (PDT) |
| In-Reply-To | <554F9525.5040101@digipen.edu> |
| References | <CAMjeLr--RfnfgWc1hdOcHiEBpq3QwC7SZk-m14wM65JtpbgMLQ@mail.gmail.com> <mailman.318.1431276220.12865.python-list@python.org> <c681b3ce-2727-4aa9-ad8a-369c662395a3@googlegroups.com> <554F9525.5040101@digipen.edu> |
| Date | Sun, 10 May 2015 14:12:44 -0500 |
| Subject | Re: anomaly |
| From | boB Stepp <robertvstepp@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=UTF-8 |
| X-Mailman-Approved-At | Mon, 11 May 2015 09:28:35 +0200 |
| 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.345.1431329316.12865.python-list@python.org> (permalink) |
| Lines | 52 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1431329316 news.xs4all.nl 2861 [2001:888:2000:d::a6]:47897 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:90355 |
Show key headers only | View raw
I am in process learning Python and normally hang out on the Tutor list, but monitor this one hoping to learn what I can. This thread is of interest to me from the standpoint of trying to understand the Python way of doing things. On Sun, May 10, 2015 at 12:28 PM, Gary Herron <gherron@digipen.edu> wrote: > On 05/10/2015 09:48 AM, Rustom Mody wrote: >> >> On Sunday, May 10, 2015 at 10:14:36 PM UTC+5:30, Ian wrote: >>> >>> On Sun, May 10, 2015 at 10:34 AM, Mark Rosenblitt-Janssen wrote: >>>> >>>> Here's something that might be wrong in Python (tried on v2.7): >>>> >>>>>>> class int(str): pass >>> >>> This defines a new class named "int" that is a subclass of str. It has >>> no relation to the builtin class int. >>> >>>>>>> int(3) >>>> >>>> '3' >>> >>> This creates an instance of the above "int" class, which is basically >>> equivalent to calling "str(3)". >>> >>> Were you expecting a different result? >> >> In C (family) languages int is a keyword >> From that pov this is completely bizarre > > > Not really. Expecting Python to act like C family languages *is* bizarre. I have to admit being surprised by this, too. I am just now studying on how to write my own classes in Python, and have come to realize that doing this is *possible*, but the *surprise* to me is why the language design allowed this to actually be done. > Common Python thought:: "We're all adults here." If you want to override > a builtin within your own namespace, who are we to stop you? I'm surprised that this thought has not been added to the "Zen Of Python", as I see it as more and more recurrent as I continue my studies. What I would like to comprehend is what is the essential mindset of Python? That is, what do I need to understand, so that I am no longer likely to be surprised by discovering new possibilities in Python such as what the current thread is discussing? -- boB
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