Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33128
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <oscar.j.benjamin@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.009 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'bug.': 0.07; 'class,': 0.07; 'false.': 0.07; 'meaningful': 0.09; 'tuple': 0.09; 'cc:addr :python-list': 0.10; 'subject:not': 0.11; 'assume': 0.11; 'sat,': 0.15; 'ah,': 0.16; 'arbitrarily': 0.16; 'multiplied': 0.16; 'sees': 0.16; 'subject:class': 0.16; 'subject:default': 0.16; 'subject:type': 0.16; 'utterly': 0.16; 'vectors': 0.16; 'wrote:': 0.17; 'pointed': 0.17; '>>>': 0.18; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; '(as': 0.27; 'opposed': 0.27; 'message- id:@mail.gmail.com': 0.27; 'chris': 0.28; 'origin': 0.29; 'vector': 0.29; 'case,': 0.29; 'points': 0.29; 'that.': 0.30; 'received:209.85.215.46': 0.30; 'sense': 0.31; 'point': 0.31; 'could': 0.32; '11,': 0.33; 'point,': 0.33; 'true.': 0.33; 'zero': 0.33; 'equal': 0.33; 'point.': 0.33; 'received:google.com': 0.34; 'false': 0.35; 'nov': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'rather': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'list,': 0.39; 'header:Received:5': 0.40; 'relationship': 0.60; 'real': 0.61; 'first': 0.61; 'time,': 0.62; 'evaluate': 0.62; 'between': 0.63; 'different': 0.63; 'more': 0.63; 'other.': 0.64; 'fact,': 0.69; 'hand': 0.82; 'deem': 0.84; "it'd": 0.84; 'oscar': 0.84; 'significance': 0.84 |
| 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 :cc:content-type; bh=8YATBPTFtG2aEKS0Zaux55oThQtSlu+b2REGjo4N6r0=; b=BkZbTUjiMUe5NZyYGNoqMpsL2x9UB8ghbCElSp3sV9GyDnN+d02sVRZD5Dt72AAMSd WII+TBNE8klZhfKuedwasyt3SlNasDUPLjt6/dR1CSL5qkpnBFzBQ6OvPOfECihgDrii 4SHvsj882WtXZ8Y11Eft/xNapfZ3ifxHwMUXII82cvIWVGJbjjBXK8IvG/i0AxOO6Vr9 H6YvjtjKpv6v+b6xKBlh1UOsE/tqKoN5GhxcT2rs6X8P+Bkz7Zb3RRTwMFoQEE5CN938 4CXmIuxrn0mdlDznUh5ZnXifrzi16MdUboAOgimT+NHMqTpHvc7W38ImVOQx+ThprWOg gwyQ== |
| MIME-Version | 1.0 |
| In-Reply-To | <CAPTjJmo2Y8a=izfBW4UXy80j+OFdpO7tMfjSen8nbZfRku4XrQ@mail.gmail.com> |
| References | <k7ma5c$qdk$1@speranza.aioe.org> <509efbb6$0$29980$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmqz654F4QZmi+6K0ExT0oSazUn-txupSkOv1dy5eEhPqg@mail.gmail.com> <CALwzidk1KoM0bAoxFyJ6BP2F0JW1QR4dQVGJdnirwZK5v2MUgA@mail.gmail.com> <CAPTjJmo2Y8a=izfBW4UXy80j+OFdpO7tMfjSen8nbZfRku4XrQ@mail.gmail.com> |
| Date | Sun, 11 Nov 2012 14:21:19 +0000 |
| Subject | Re: Method default argument whose type is the class not yet defined |
| From | Oscar Benjamin <oscar.j.benjamin@gmail.com> |
| To | Chris Angelico <rosuav@gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Cc | 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 | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3559.1352643681.27098.python-list@python.org> (permalink) |
| Lines | 47 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1352643681 news.xs4all.nl 6986 [2001:888:2000:d::a6]:35124 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:33128 |
Show key headers only | View raw
On 11 November 2012 02:47, Chris Angelico <rosuav@gmail.com> wrote: > On Sun, Nov 11, 2012 at 1:43 PM, Ian Kelly <ian.g.kelly@gmail.com> wrote: >> On Sat, Nov 10, 2012 at 7:13 PM, Chris Angelico <rosuav@gmail.com> wrote: >>> I would not assume that. The origin is a point, just like any other. >>> With a Line class, you could deem a zero-length line to be like a >>> zero-element list, but Point(0,0) is more like the tuple (0,0) which >>> is definitely True. >> >> It's more like the number 0 than the tuple (0,0). >> >> 0 is the origin on a 1-dimensional number line. >> (0,0) is the origin on a 2-dimensional number plane. >> >> In fact, it might be pointed out that Point(0, 0) is a generalization >> of 0+0j, which is equal to 0. > > Ah, good point. In any case, though, it'd be an utterly inconsequential bug. You were right the first time, Chris. A point that happens to coincide with the arbitrarily chosen origin is no more truthy or falsey than any other. A vector of length 0 on the other hand is a very different beast. The significance of zero in real algebra is not that it is the origin but rather that it is the additive and multiplicative zero: a + 0 = a for any real number a a * 0 = 0 for any real number a The same is true for a vector v0, of length 0: v + v0 = v for any vector v a * v0 = v0 for any scalar a There is however no meaningful sense in which points (as opposed to vectors) can be added to each other or multiplied by anything, so there is no zero point. The relationship between points and vectors is analogous to the relationship between datetimes and timedeltas. Having Vector(0, 0) evaluate to False is analogous to having timedelta(0) evaluate to False and is entirely sensible. Having Point(0, 0) evaluate to False is precisely the same conceptual folly that sees midnight evaluate as False. Oscar
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Method default argument whose type is the class not yet defined Jennie <nameDOTportua@gmail.com> - 2012-11-10 20:33 +0100
Re: Method default argument whose type is the class not yet defined Chris Angelico <rosuav@gmail.com> - 2012-11-11 06:56 +1100
Re: Method default argument whose type is the class not yet defined Terry Reedy <tjreedy@udel.edu> - 2012-11-10 15:29 -0500
Re: Method default argument whose type is the class not yet defined Jennie <nameDOTportua@gmail.com> - 2012-11-10 21:51 +0100
Re: Method default argument whose type is the class not yet defined Dave Angel <d@davea.name> - 2012-11-10 17:30 -0500
Re: Method default argument whose type is the class not yet defined Jennie <marco.buttu@gmail.com> - 2012-11-10 21:51 +0100
Re: Method default argument whose type is the class not yet defined Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-11 01:13 +0000
Re: Method default argument whose type is the class not yet defined Chris Angelico <rosuav@gmail.com> - 2012-11-11 13:13 +1100
Re: Method default argument whose type is the class not yet defined Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-10 19:43 -0700
Re: Method default argument whose type is the class not yet defined Roy Smith <roy@panix.com> - 2012-11-10 21:53 -0500
Re: Method default argument whose type is the class not yet defined Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-10 23:43 -0700
Re: Method default argument whose type is the class not yet defined Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-10 23:45 -0700
Re: Method default argument whose type is the class not yet defined Chris Angelico <rosuav@gmail.com> - 2012-11-11 13:47 +1100
Re: Method default argument whose type is the class not yet defined Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2012-11-11 14:21 +0000
Re: Method default argument whose type is the class not yet defined Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-11 22:31 +0000
Re: Method default argument whose type is the class not yet defined Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2012-11-12 00:31 +0000
Re: Method default argument whose type is the class not yet defined Steve Howell <showell30@yahoo.com> - 2012-11-11 16:56 -0800
Re: Method default argument whose type is the class not yet defined Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-12 04:46 +0000
Re: Method default argument whose type is the class not yet defined Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-12 01:10 +0000
Re: Method default argument whose type is the class not yet defined Roy Smith <roy@panix.com> - 2012-11-11 20:15 -0500
Re: Method default argument whose type is the class not yet defined Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-12 01:35 +0000
Re: Method default argument whose type is the class not yet defined Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2012-11-12 01:18 +0000
Re: Method default argument whose type is the class not yet defined Roy Smith <roy@panix.com> - 2012-11-11 20:34 -0500
Re: Method default argument whose type is the class not yet defined Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-12 01:29 +0000
Re: Method default argument whose type is the class not yet defined Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2012-11-12 01:50 +0000
Re: Method default argument whose type is the class not yet defined Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2012-11-11 01:23 +0000
Re: Method default argument whose type is the class not yet defined Steve Howell <showell30@yahoo.com> - 2012-11-11 16:32 -0800
csiph-web