Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!news.skynet.be!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; 'python,': 0.02; 'argument': 0.04; 'compile-time': 0.07; 'dynamically': 0.07; 'performs': 0.07; 'statically': 0.07; 'subject:How': 0.09; 'imply': 0.09; 'subject:method': 0.09; 'typed': 0.09; 'language,': 0.11; 'language': 0.14; 'argument.': 0.16; 'deferred': 0.16; 'haskell,': 0.16; 'nonetheless': 0.16; 'run-time.': 0.16; 'subject:class': 0.16; 'subject:instance': 0.16; 'subject:pass': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'header:In-Reply-To:1': 0.25; '(which': 0.26; 'am,': 0.27; 'checking': 0.27; 'language.': 0.27; 'message-id:@mail.gmail.com': 0.27; '"the': 0.29; 'received:209.85.215.46': 0.30; 'function': 0.30; 'checked': 0.30; 'to:addr:python-list': 0.33; 'operations': 0.33; 'received:google.com': 0.34; 'acceptable': 0.35; 'nov': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'useful': 0.36; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'description': 0.39; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'necessarily': 0.63; 'information': 0.63; 'more': 0.63; '26,': 0.65; 'direct': 0.69; 'sounds': 0.71; 'it"': 0.84; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=2aP7wGnt7C294sEc9yeCzb/Xh2sz8Sy4Q6/5XnIcLM4=; b=UO8YqIGkR/yaUNYo06mzKgd99wieMpoDWFU83y9mUWqjxaylPdDZ+XHBT3X1OVW3MV pxxXdYIj3gPPhZ9TnMk9cgddPja5kETQxAS3oI8sG0imHxxi1rFwnDh0cVeErIVNdmAS vi4GsPLfEAwyRHfbEZGv6XN07IuERgH1aurXirsHfq5rjTDjKkLVVc67GCGq989xWboq IJ2ajb7rg+s6z142o93Wn7IiDYdMVrry2SvYAaJt8CEl3Ttt8RBVPedDKnOcXooHeMfX 7F3ab1CYEbB64oDpHm4WzMwYnTZ6fcJdYrx8psL3dOcXPSbcDTO0DDQYKA+n8EFv0fbX ZyOQ== MIME-Version: 1.0 In-Reply-To: References: <3193e3dd-0507-4ff7-9026-ee80e5d9c1dd@googlegroups.com> From: Ian Kelly Date: Mon, 26 Nov 2012 13:51:16 -0700 Subject: Re: How to pass class instance to a method? To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1353963109 news.xs4all.nl 6988 [2001:888:2000:d::a6]:51757 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33944 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. The description that "the set of acceptable types for an argument is determined by the operations which the function performs on it" sounds to me more like type inference, as exemplified by Haskell, which is nonetheless a statically typed language.