Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #56693

Re: I am never going to complain about Python again

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <joshua.landau.ws@gmail.com>
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; 'explicitly': 0.05; 'say,': 0.05; 'subject:Python': 0.06; 'context': 0.07; 'important,': 0.07; '3),': 0.09; 'undefined': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'assume': 0.14; '(there': 0.16; 'defined,': 0.16; 'equality.': 0.16; 'implied.': 0.16; 'integers.': 0.16; 'invoice.': 0.16; 'know;': 0.16; 'tends': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'language': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; '(but': 0.19; "python's": 0.19; 'restrictions': 0.19; 'seems': 0.21; '>>>': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'decide': 0.24; 'cc:2**0': 0.24; 'nearly': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'function': 0.29; 'correct': 0.29; 'generally': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'usually': 0.31; '+0100,': 0.31; "d'aprano": 0.31; 'remotely': 0.31; 'steven': 0.31; 'this.': 0.32; 'fri,': 0.33; 'not.': 0.33; 'agree': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'described': 0.36; 'in.': 0.36; 'surely': 0.36; 'error.': 0.37; 'example,': 0.37; 'help,': 0.39; 'space': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'numbers': 0.61; 'course': 0.61; "you'll": 0.62; 'real': 0.63; 'within': 0.65; 'natural': 0.68; 'stated': 0.69; 'applying': 0.72; 'promoting': 0.78; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=XhFXxpoiOieF+Ma9wR0B49HPfZHxNxSK2Qv8t1wCKZ8=; b=pLHRUpBPOlCRHbbQGoAWxb7i8jQUD3X6+HswTyyGCzxaCXkIxR+6TlJuTm94aWJP13 J3dV/GlnoDXbT4Novaz9W/XJ8GMUA27EoPrtqe29DVrE5CiVc0YLINIPGk6PRuEQBgrs Rv5BlbpsD1u4R8sN9EqdAd/p/nUREv1H3YcPzHt3PCfBgQqal5XxcXZ/ifSlfV+NLNe2 nSyKws1b0Ys1UjQdShmKnqFzsEgQtLMYkeaoqm/Ht5m7J+OTBpAoTHWQfHSZypU+m9Qp BUNLhOSUVSOQkc8H3JN2mVE1346IQr4DfTn/Y97jxWyZC+CePFf0KT0w3hLJd1NdEPdH 6xfQ==
X-Received by 10.152.3.42 with SMTP id 10mr17330163laz.22.1381510631189; Fri, 11 Oct 2013 09:57:11 -0700 (PDT)
MIME-Version 1.0
Sender joshua.landau.ws@gmail.com
In-Reply-To <5257c0b0$0$29984$c3e8da3$5496439d@news.astraweb.com>
References <52562ee3$0$2931$c3e8da3$76491128@news.astraweb.com> <roy-582B40.09094210102013@news.panix.com> <52575db4$0$29984$c3e8da3$5496439d@news.astraweb.com> <mailman.991.1381479498.18130.python-list@python.org> <5257c0b0$0$29984$c3e8da3$5496439d@news.astraweb.com>
From Joshua Landau <joshua@landau.ws>
Date Fri, 11 Oct 2013 17:56:30 +0100
X-Google-Sender-Auth z3Lnsk9OUKUL6V3j-CNcOae40Jw
Subject Re: I am never going to complain about Python again
To "Steven D'Aprano" <steve+comp.lang.python@pearwood.info>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.1008.1381510639.18130.python-list@python.org> (permalink)
Lines 55
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1381510639 news.xs4all.nl 15903 [2001:888:2000:d::a6]:43517
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:56693

Show key headers only | View raw


On 11 October 2013 10:11, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> On Fri, 11 Oct 2013 09:17:37 +0100, Joshua Landau wrote:
>
>> On 11 October 2013 03:08, Steven D'Aprano
>> <steve+comp.lang.python@pearwood.info> wrote:
>>>
>>> Given:
>>>
>>> x ∈ ℝ, x = 2  (reals)
>>> y ∈ ℕ, y = 2  (natural numbers)
>>>
>>> we have x = y, but since 1/y is undefined (there is no Natural number
>>> 1/2), 1/x != 1/y.
>>
>> Surely 1/y is perfectly well defined, as only y, not 1/y, is constrained
>> to the natural numbers.
>
> Context is important, and usually implied. 1/y within the natural numbers
> is treated in the same way as sqrt(-1) within the reals.

I don't know; a rational tends to be described as any number of the
form x/y where x, y ∈ ℕ. Hence I don't agree that it's reasonable to
ever assume that 1/y has to exist in the same space as y unless
explicitly stated or generally working within, say, the integers.
Neither of those are remotely true of Python so I don't see how this
point is relevant when discussing Python's concept of equality.

> Try it on your
> calculator, and chances are very good you'll get an error. Try it in
> Python 2, or nearly any other programming language (but not Python 3),
> and again, chances are you'll get an error.

*Remains unconvinced.* None of that seems to actually matter.

> If you implicitly decide to promote entities, then of course you can
> promote y to a real then take the invoice.

I'm not. I'm just not applying the restrictions on y to the function it's in.

> But that trick still doesn't
> work for the original example, int(0.0) == int(0+0j) because promoting 0
> to complex doesn't help, you have to demote 0+0j to real and that's
> ambiguous.

I agree on this. The correct interpretation of

    0.0 == 0 + 0j

is, of course

    complex(0.0) == 0 + 0j

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

I am never going to complain about Python again Steven D'Aprano <steve@pearwood.info> - 2013-10-10 04:36 +0000
  Re: I am never going to complain about Python again Chris Angelico <rosuav@gmail.com> - 2013-10-10 15:50 +1100
  Re: I am never going to complain about Python again Chris Rebert <clp2@rebertia.com> - 2013-10-09 22:26 -0700
  Re: I am never going to complain about Python again Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-10 06:39 +0100
  Re: I am never going to complain about Python again Christian Gollwitzer <auriocus@gmx.de> - 2013-10-10 08:41 +0200
  Re: I am never going to complain about Python again "Frank Millman" <frank@chagford.com> - 2013-10-10 10:23 +0200
  Re: I am never going to complain about Python again MRAB <python@mrabarnett.plus.com> - 2013-10-10 12:10 +0100
  Re: I am never going to complain about Python again Tim Chase <python.list@tim.thechases.com> - 2013-10-10 06:43 -0500
  Re: I am never going to complain about Python again "Frank Millman" <frank@chagford.com> - 2013-10-10 13:44 +0200
  Re: I am never going to complain about Python again Roy Smith <roy@panix.com> - 2013-10-10 09:09 -0400
    Re: I am never going to complain about Python again Neil Cerutti <neilc@norwich.edu> - 2013-10-10 15:51 +0000
      Re: I am never going to complain about Python again Rotwang <sg552@hotmail.co.uk> - 2013-10-10 16:57 +0100
        Re: I am never going to complain about Python again MRAB <python@mrabarnett.plus.com> - 2013-10-10 17:10 +0100
          Re: I am never going to complain about Python again Neil Cerutti <neilc@norwich.edu> - 2013-10-10 17:48 +0000
            Re: I am never going to complain about Python again Ian Kelly <ian.g.kelly@gmail.com> - 2013-10-10 12:35 -0600
              Re: I am never going to complain about Python again Neil Cerutti <neilc@norwich.edu> - 2013-10-10 18:49 +0000
            Re: I am never going to complain about Python again Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-10-10 20:47 +0100
              Re: I am never going to complain about Python again Neil Cerutti <neilc@norwich.edu> - 2013-10-10 19:54 +0000
            Re: I am never going to complain about Python again Cameron Simpson <cs@zip.com.au> - 2013-10-11 08:52 +1100
            Re: I am never going to complain about Python again Roy Smith <roy@panix.com> - 2013-10-10 20:07 -0400
              Is this the room for an argument? John Ladasky <john_ladasky@sbcglobal.net> - 2013-10-10 21:26 -0700
                Re: Is this the room for an argument? Roy Smith <roy@panix.com> - 2013-10-11 09:49 -0400
            Re: I am never going to complain about Python again Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-11 02:23 +0000
              Re: I am never going to complain about Python again Neil Cerutti <neilc@norwich.edu> - 2013-10-11 12:31 +0000
    Re: I am never going to complain about Python again Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-10-10 20:09 -0400
    Re: I am never going to complain about Python again Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-11 02:08 +0000
      Re: I am never going to complain about Python again Joshua Landau <joshua@landau.ws> - 2013-10-11 09:17 +0100
        Re: I am never going to complain about Python again Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-11 09:11 +0000
          Re: I am never going to complain about Python again Chris Angelico <rosuav@gmail.com> - 2013-10-11 20:52 +1100
          Re: I am never going to complain about Python again Joshua Landau <joshua@landau.ws> - 2013-10-11 17:56 +0100

csiph-web