Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: 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; 'subject:Python': 0.05; 'beginner': 0.05; "'a'": 0.07; 'see.': 0.07; 'true)': 0.07; 'used.': 0.07; 'python': 0.09; "'no": 0.09; 'if,': 0.09; 'observation': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'weak': 0.09; 'language,': 0.11; 'yet.': 0.13; 'slightly': 0.15; '10:59': 0.16; 'observations': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'scientists': 0.16; 'statement.': 0.16; 'strong,': 0.16; 'subject:Objects': 0.16; 'later': 0.16; 'wrote:': 0.17; 'typing': 0.17; 'why.': 0.17; '>>>': 0.18; 'variable': 0.20; 'trying': 0.21; "haven't": 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'developers': 0.26; 'am,': 0.27; 'possibly': 0.27; 'separate': 0.27; "doesn't": 0.28; 'header:X-Complaints-To:1': 0.28; 'reply.': 0.28; '(possibly': 0.29; "i'm": 0.29; "skip:' 10": 0.30; 'code': 0.31; 'from:addr:yahoo.co.uk': 0.32; 'says': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'thanks': 0.34; 'something': 0.35; 'there': 0.35; 'received:org': 0.36; 'really': 0.36; 'except': 0.36; 'explain': 0.36; 'far': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'fact': 0.38; 'object': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'most': 0.61; "you've": 0.61; 'real': 0.61; 'strange': 0.62; 'information': 0.63; 'show': 0.63; 'taking': 0.65; 'benefit': 0.70; "'view'": 0.84; 'enforced': 0.84; 'kat': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Objects in Python Date: Wed, 22 Aug 2012 19:23:44 +0100 References: <18409992-1e28-4721-8e64-60c69668da4e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-92-24-123-14.ppp.as43234.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-Antivirus: avast! (VPS 120821-0, 21/08/2012), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 73 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345659787 news.xs4all.nl 6959 [2001:888:2000:d::a6]:51950 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27669 On 22/08/2012 18:46, lipska the kat wrote: > On 22/08/12 18:01, Terry Reedy wrote: >> On 8/22/2012 10:59 AM, lipska the kat wrote: >> >>> There is no real enforced concept of information hiding, no binding of >>> type to variable in fact no concept of typing at all as far as I can >>> see. >> >> Given that type(valid_name) always returns a type(class), that is a >> slightly strange statement. > > [snip] > > Well I'm a beginner so I'm allowed to make strange statements. > However I don't think it's that strange and here's why. > > If, in a language, I find I am able to say > > a = 1 > > then later, in the same scope I can say > > a = "foo" > > then later again in the same scope I can say > > a = ([1,2,3], "xyz", True) > > then, and I may be missing something here, to me, that doesn't say > 'strongly typed' that says 'no typing constraints whatsoever' > > If you can show me a 'type' that cannot be assigned to > > a > > in the same scope then I would be most interested to know, I haven't > found one yet. You've said nothing above except that any object you like can be bound to a Python name. The name 'a' is never used. What happens when you actually do something with the object that you've bound to 'a'? > > We need to separate out the 'view' from the 'implementation' here. > Most developers I know, if looking at the code and without the possibly > dubious benefit of knowing that in Python 'everything is an object' > would not call this 'strong typing' I really despair that after ten years of using Python people still seem to be incapable of distinguishing strong, static, weak and dynamic typing. Not that it's a specific Python problem of course, just that I always get to read about it here. > > Once again, this is not a criticism, it's an observation > > It is OK to to make (possibly erroneous) observations isn't it? Not if undoes concepts that computer scientists have patiently been trying to explain for years. > > Thanks for taking the time to reply. > > lipska > -- Cheers. Mark Lawrence.