Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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; 'python,': 0.02; 'argument': 0.04; 'compile-time': 0.07; 'dynamically': 0.07; 'parameter': 0.07; 'performs': 0.07; 'statically': 0.07; 'subject:How': 0.09; 'imply': 0.09; 'subject:method': 0.09; 'typed': 0.09; 'cc:addr:python-list': 0.10; 'language,': 0.11; 'language': 0.14; 'argument.': 0.16; 'deferred': 0.16; 'run- time.': 0.16; 'subject:class': 0.16; 'subject:instance': 0.16; 'subject:pass': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'defined': 0.22; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '(which': 0.26; 'am,': 0.27; 'checking': 0.27; 'implied': 0.29; 'function': 0.30; 'checked': 0.30; 'function.': 0.33; 'operations': 0.33; 'acceptable': 0.35; 'nov': 0.35; 'pm,': 0.35; 'subject:?': 0.35; 'useful': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'received:192': 0.39; 'where': 0.40; 'received:192.168': 0.40; 'necessarily': 0.63; 'information': 0.63; '26,': 0.65; 'header :Reply-To:1': 0.68; 'direct': 0.69; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'enforced': 0.84; 'received:74.208.4.194': 0.84 Date: Mon, 26 Nov 2012 16:58:47 -0500 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-Version: 1.0 To: Ian Kelly Subject: Re: How to pass class instance to a method? References: <3193e3dd-0507-4ff7-9026-ee80e5d9c1dd@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:foD0ratVgAnRCM6WtvfTIm9GnGA5CKmwzbWLZ4grjXY yuQ83m6kkjngHJk+8+5IiTdyx5G1JTRRbSWJqJcCstVE3hjfZ5 lt0k0RMc6qWnhq5guC6XLLdQoX28wwiI4ym8ON9/YDmwaBcbAt GcxRHxiK3wcIAAUoxMxQntOCWS/2Ui5sentBuIu73X3YcB4voD ZJ4q2Lg/NUNcELbZ08Z7ONEkQaAnZGIKhBpsBVIlk8s8n3h6s5 Y298NAHDezGxlPaA452CJ/KMi39Gvk3JctYDHPcEwMTRAGCunp dRbhNOyqS/twk4pkZ1Iggp+7vQLpBv9jrNSGFyL7YYGcctKcA= = Cc: Python X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: d@davea.name 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1353967142 news.xs4all.nl 6842 [2001:888:2000:d::a6]:36056 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33948 On 11/26/2012 03:51 PM, Ian Kelly wrote: > On Mon, Nov 26, 2012 at 9:56 AM, Nobody wrote: >> In a dynamically-typed language such as Python, the set of acceptable >> types for an argument is determined by the operations which the function >> performs on it. This is in direct contrast to a statically-typed language, >> where the set of acceptable operations on an argument is determined by the >> type of the argument. > Not how I would put it. In a statically typed language, types are > checked at compile-time (which does not necessarily imply that useful > type information can be made available to an IDE), whereas in a > dynamically typed language, some or all type checking is deferred to > run-time. Not how I would put it. In a statically typed language, the valid types are directly implied by the function parameter declarations, while in a dynamic language, they're defined in the documentation, and only enforced (if at all) by the body of the function. -- DaveA