Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27690
| Path | csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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; 'explicitly': 0.04; 'subject:Python': 0.05; 'incompatible': 0.07; 'variable,': 0.07; 'variables.': 0.07; 'python': 0.09; 'declarations': 0.09; 'forcing': 0.09; 'stored': 0.10; 'language,': 0.11; 'aug': 0.13; 'language': 0.14; 'clear.': 0.16; 'constants': 0.16; 'declaration,': 0.16; 'duplicating': 0.16; 'explicitly.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'function.)': 0.16; 'infinitely': 0.16; 'innermost': 0.16; 'nest': 0.16; 'subject:Objects': 0.16; 'suppose.': 0.16; 'syntactic': 0.16; 'variable.': 0.16; 'wrote:': 0.17; 'exists': 0.17; 'integer': 0.17; 'restrictions': 0.17; 'thu,': 0.17; 'typing': 0.17; 'variables': 0.17; '(in': 0.18; 'variable': 0.20; 'sort': 0.21; 'received:209.85.214.174': 0.21; 'effort.': 0.22; 'parse': 0.22; 'defined': 0.22; "python's": 0.23; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'question': 0.27; 'errors.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'behaviour': 0.29; 'decimal': 0.29; 'declared': 0.29; "people's": 0.29; "i'm": 0.29; 'related': 0.30; 'figure': 0.30; 'aside': 0.32; 'to:addr :python-list': 0.33; 'languages': 0.33; 'operations': 0.33; 'received:google.com': 0.34; 'wrong': 0.34; 'list': 0.35; 'especially': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'add': 0.36; 'but': 0.36; "i'll": 0.36; 'should': 0.36; 'thank': 0.36; 'enough': 0.36; 'does': 0.37; 'why': 0.37; 'quite': 0.37; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'called': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'matter': 0.61; "you've": 0.61; 'further': 0.61; 'personal': 0.62; 'close': 0.63; 'worth': 0.63; 'information,': 0.63; 'grab': 0.64; 'six': 0.65; 'applying': 0.69; 'advantages': 0.71; 'disappears': 0.84; 'extreme,': 0.84; 'hugely': 0.84; 'itself?': 0.84; 'glad': 0.86; 'kat': 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=qF9Ta2w6Ictm2Q2/uf/czVFUrbJ73u12PNo0YFRVUnA=; b=F0jZEq6d/eEiAUP4j6NWnP6UuG+fFOowEHwLiKKbJ/4yeG4g0Zqm1vnsjxtafNjgVz nCxgIvfL9VlQGNqlvbUkNnBJzrBsrPC+V1bSr6i98UBw+2BhVqaSy2+B8H3s/VIDkmb4 xsGDYglFXzJg2hOJSCOwI3vWgp9N4ayFGwEgaa217cF6nalrS4JgwHjWUMZvbDdVZ95Z jxn/8wexyoqpvF1lv7ylsxm8UdF78pUHhE3OjGVxnqLrLhH60Lj5Pn2OMxpKLQ2oJKdh q4YQmijMIH5ZQtik2mh5q0MRtkbvDzXKDv5mAAGjJtSFdnkCTe0FBnlLlKLk00VF2sbZ aeUA== |
| MIME-Version | 1.0 |
| In-Reply-To | <1pidnX71rLNrsajNnZ2dnUVZ8jCdnZ2d@bt.com> |
| References | <18409992-1e28-4721-8e64-60c69668da4e@googlegroups.com> <w7adnXiWqoJSbqnNnZ2dnUVZ7o2dnZ2d@bt.com> <mailman.3668.1345654939.4697.python-list@python.org> <gsSdnaYuqqabhqjNnZ2dnUVZ8jmdnZ2d@bt.com> <mailman.3675.1345659675.4697.python-list@python.org> <1pidnX71rLNrsajNnZ2dnUVZ8jCdnZ2d@bt.com> |
| Date | Thu, 23 Aug 2012 12:02:16 +1000 |
| Subject | Re: Objects in Python |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| 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.3691.1345687339.4697.python-list@python.org> (permalink) |
| Lines | 48 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1345687339 news.xs4all.nl 6879 [2001:888:2000:d::a6]:60139 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:27690 |
Show key headers only | View raw
On Thu, Aug 23, 2012 at 5:03 AM, lipska the kat <lipskathekat@yahoo.co.uk> wrote: > On 22/08/12 19:15, Ian Kelly wrote: >> >> You're conflating "strong typing" with "static typing". Strong typing >> does not refer to restrictions on what type of data can be stored >> where, but to restrictions on how operations on that data can be >> intermixed. > > Yes of course I am, thank you for pointing that out. > I don't know why I have this overwhelming need to see variables explicitly > defined ... years of 'same old same old' I suppose. Python's object model is not fundamentally incompatible with a system of declared variables. I, too, like declaring my variables explicitly. There are quite a few advantages to it: 1) Scoping is extremely clear. (Leaving aside anomalous behaviour like Javascript's "var" declarations applying to a whole function.) You see a declaration, you know that variable exists there and further inside only. In a C-style language, that means it disappears at the corresponding close brace. 2) Related to the above, you can infinitely nest scopes. There's nothing wrong with having six variables called 'q'; you always use the innermost one. Yes, this can hurt readability, especially taken to this sort of stupid extreme, but that's a question for a style guide and not a language design. 3) Variable-name typos can be caught at parse time. In Python, if you misspell a variable, you've just made a new local variable. It has its downsides, too, of course; mainly that it's (in some people's opinion) syntactic salt. Why should I have to tell the interpreter/compiler what it can figure out by itself? It's duplicating information, and that's inefficient. It's like forcing all your integer constants to be given in both decimal and hex, to catch errors. I'm of the opinion that the benefits are worth the effort. Others disagree. It's hugely a matter of taste, and I'm just glad that there are enough languages around that we can all have what we want :) If you like the Python object model but want to add variable declarations, grab me off list and I'll tell you about my personal favorite language... ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Objects in Python shaun <shaun.wiseman91@gmail.com> - 2012-08-22 07:13 -0700
Re: Objects in Python Joel Goldstick <joel.goldstick@gmail.com> - 2012-08-22 10:31 -0400
Re: Objects in Python Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2012-08-22 17:31 +0300
Re: Objects in Python Peter Otten <__peter__@web.de> - 2012-08-22 16:36 +0200
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-22 15:59 +0100
Re: Objects in Python MRAB <python@mrabarnett.plus.com> - 2012-08-22 16:58 +0100
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-22 17:10 +0100
Re: Objects in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-22 17:30 +0100
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-22 18:06 +0100
Re: Objects in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-22 19:07 +0100
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-22 20:13 +0100
Re: Objects in Python Terry Reedy <tjreedy@udel.edu> - 2012-08-22 13:01 -0400
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-22 18:46 +0100
Re: Objects in Python Ian Kelly <ian.g.kelly@gmail.com> - 2012-08-22 12:15 -0600
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-22 20:03 +0100
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-23 12:02 +1000
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-23 04:11 +0000
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-23 15:26 +1000
Re: Objects in Python Jan Kuiken <jan.kuiken@quicknet.nl> - 2012-08-23 20:02 +0200
Re: Objects in Python Ian Kelly <ian.g.kelly@gmail.com> - 2012-08-23 12:17 -0600
Re: Objects in Python Jan Kuiken <jan.kuiken@quicknet.nl> - 2012-08-23 22:43 +0200
Re: Objects in Python 88888 Dihedral <dihedral88888@googlemail.com> - 2012-08-25 23:14 -0700
Re: Objects in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-22 19:23 +0100
Re: Re: Objects in Python Evan Driscoll <driscoll@cs.wisc.edu> - 2012-08-22 14:03 -0500
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-22 20:45 +0100
Re: Objects in Python MRAB <python@mrabarnett.plus.com> - 2012-08-22 21:31 +0100
Re: Objects in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-22 21:46 +0100
Methods versus functions [was Re: Objects in Python] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-23 04:07 +0000
Re: Re: Objects in Python Evan Driscoll <driscoll@cs.wisc.edu> - 2012-08-22 16:31 -0500
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-23 10:19 +0100
Re: Re: Objects in Python Evan Driscoll <driscoll@cs.wisc.edu> - 2012-08-23 11:44 -0500
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-23 18:56 +0100
Re: Objects in Python Ben Finney <ben+python@benfinney.id.au> - 2012-08-23 09:58 +1000
Re: Objects in Python Ian Kelly <ian.g.kelly@gmail.com> - 2012-08-22 18:10 -0600
Re: Re: Objects in Python Evan Driscoll <driscoll@cs.wisc.edu> - 2012-08-22 23:49 -0500
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-23 06:55 +0000
Re: Objects in Python Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2012-08-23 11:59 +0300
Re: Objects in Python MRAB <python@mrabarnett.plus.com> - 2012-08-23 12:28 +0100
Re: Objects in Python Jerry Hill <malaclypse2@gmail.com> - 2012-08-23 10:43 -0400
Re: Objects in Python Evan Driscoll <driscoll@cs.wisc.edu> - 2012-08-23 12:17 -0500
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-23 17:56 +0000
Variables vs names [was: Objects in Python] Evan Driscoll <driscoll@cs.wisc.edu> - 2012-08-23 14:22 -0500
Re: Variables vs names Ben Finney <ben+python@benfinney.id.au> - 2012-08-24 10:02 +1000
Re: Variables vs names [was: Objects in Python] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-25 02:05 +0000
Re: Variables vs names Ben Finney <ben+python@benfinney.id.au> - 2012-08-25 15:24 +1000
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-24 08:00 +1000
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-25 03:04 +0000
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-25 16:34 +1000
Re: Objects in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-25 09:55 +0100
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-25 20:23 +1000
Re: Objects in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-25 12:01 +0100
Re: Objects in Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-25 15:56 -0400
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-26 09:27 +1000
Re: Objects in Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-25 20:43 -0400
Re: Re: Objects in Python Evan Driscoll <driscoll@cs.wisc.edu> - 2012-08-26 00:25 -0500
Re: Variables vs names [was: Objects in Python] Chris Angelico <rosuav@gmail.com> - 2012-08-24 09:34 +1000
Re: Objects in Python Ben Finney <ben+python@benfinney.id.au> - 2012-08-24 09:49 +1000
Re: Variables vs names [was: Objects in Python] Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-23 19:52 -0400
Re: Objects in Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-23 19:54 -0400
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-24 10:01 +1000
Re: Objects in Python Terry Reedy <tjreedy@udel.edu> - 2012-08-23 13:17 -0400
Re: Objects in Python Ben Finney <ben+python@benfinney.id.au> - 2012-08-24 00:16 +1000
Re: Objects in Python Roy Smith <roy@panix.com> - 2012-08-23 20:36 -0400
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-24 11:34 +1000
Re: Objects in Python alex23 <wuwei23@gmail.com> - 2012-08-23 20:17 -0700
Re: Re: Objects in Python Evan Driscoll <driscoll@cs.wisc.edu> - 2012-08-24 04:14 -0500
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-24 10:00 +0000
Re: Objects in Python Grant Edwards <invalid@invalid.invalid> - 2012-08-24 13:27 +0000
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-25 05:18 +1000
Re: Re: Objects in Python Evan Driscoll <driscoll@cs.wisc.edu> - 2012-08-26 00:45 -0500
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-26 13:43 +0000
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-26 23:58 +1000
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-26 14:18 +0000
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-27 00:54 +1000
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-26 22:47 +0000
Re: Objects in Python Roy Smith <roy@panix.com> - 2012-08-26 10:02 -0400
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-27 00:14 +1000
Re: Objects in Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-26 16:12 -0400
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-26 23:29 +0000
Re: Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-26 16:22 +1000
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-26 12:02 +0000
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-26 23:34 +1000
Re: Objects in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-26 15:02 +0100
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-27 00:05 +1000
Re: Objects in Python Roy Smith <roy@panix.com> - 2012-08-26 09:41 -0400
Identity function id() [was Re: Objects in Python] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-24 10:06 +0000
Re: Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-23 15:33 +1000
Re: Objects in Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-23 14:30 -0400
Re: Objects in Python Alexander Blinne <news@blinne.net> - 2012-08-24 15:23 +0200
Re: Objects in Python Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2012-08-24 09:38 +0200
Re: Objects in Python Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2012-08-24 10:03 +0200
Re: Objects in Python Walter Hurry <walterhurry@lavabit.com> - 2012-08-23 01:19 +0000
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-23 04:14 +0000
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-23 09:10 +0100
Re: Objects in Python Ben Finney <ben+python@benfinney.id.au> - 2012-08-23 23:59 +1000
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-23 15:20 +0100
Re: Objects in Python Ben Finney <ben+python@benfinney.id.au> - 2012-08-24 00:24 +1000
Re: Objects in Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-23 09:03 +0100
Re: Objects in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-23 04:34 +0000
Re: Objects in Python rusi <rustompmody@gmail.com> - 2012-08-23 10:04 -0700
Re: Objects in Python John Gordon <gordon@panix.com> - 2012-08-22 15:03 +0000
Re: Objects in Python shaun <shaun.wiseman91@gmail.com> - 2012-08-22 08:25 -0700
Re: Objects in Python Chris Angelico <rosuav@gmail.com> - 2012-08-23 01:47 +1000
Re: Objects in Python Dave Angel <d@davea.name> - 2012-08-22 11:51 -0400
Re: Objects in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-22 17:13 +0100
Re: Objects in Python Ian Kelly <ian.g.kelly@gmail.com> - 2012-08-22 11:29 -0600
csiph-web