Received: by 10.180.107.167 with SMTP id hd7mr646285wib.0.1348154181836; Thu, 20 Sep 2012 08:16:21 -0700 (PDT) X-BeenThere: dev-python@googlegroups.com Received: by 10.216.141.22 with SMTP id f22ls3366548wej.0.gmail; Thu, 20 Sep 2012 08:16:21 -0700 (PDT) Received: by 10.180.105.38 with SMTP id gj6mr844605wib.0.1348154181625; Thu, 20 Sep 2012 08:16:21 -0700 (PDT) Received: by 10.180.105.38 with SMTP id gj6mr844604wib.0.1348154181618; Thu, 20 Sep 2012 08:16:21 -0700 (PDT) Return-Path: Received: from mail.python.org (mail.python.org. [2001:888:2000:d::a6]) by gmr-mx.google.com with ESMTPS id cq5si362134wib.1.2012.09.20.08.16.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 08:16:21 -0700 (PDT) Received-SPF: pass (google.com: domain of python-dev-bounces+dev-python+garchive-30976=googlegroups....@python.org designates 2001:888:2000:d::a6 as permitted sender) client-ip=2001:888:2000:d::a6; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of python-dev-bounces+dev-python+garchive-30976=googlegroups....@python.org designates 2001:888:2000:d::a6 as permitted sender) smtp.mail=python-dev-bounces+dev-python+garchive-30976=googlegroups....@python.org; dkim=pass header...@python.org Received: from albatross.python.org (localhost [127.0.0.1]) by mail.python.org (Postfix) with ESMTP id 3XN1jx2JhCzPyk for ; Thu, 20 Sep 2012 17:16:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=python.org; s=200901; t=1348154181; bh=LAfd9dJNqDboGHxpBJX1DJydd9eQwik+3Dn0vWN1isI=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:From:To:Cc: Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:Content-Type:Content-Transfer-Encoding:Sender; b=SXolMRCwkiOyhbBj6V1Xyih87CADEaMsrUVwIf2l3lAN7ErLIIygPr6XLIf3CSV6z EmuR0dKk6xZWlSXjLPz+vxKjvnFv+GngltpiSu1MSJoMwdHiAk9OI8QQC1FA5y6i65 3bEO1zIxeRBVqrrOT6LTS9moph8qfc12uPz1ExIY= X-Original-To: python-...@python.org Delivered-To: python-...@mail.python.org Received: from mail-ie0-f174.google.com (mail-ie0-f174.google.com [209.85.223.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.python.org (Postfix) with ESMTPSA id 3XN1hM2lFpzQgM for ; Thu, 20 Sep 2012 17:14:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=python.org; s=200901; t=1348154099; bh=62j1XV5npa4RXy6jZLwE2FL3s4UusZ66zEt8Ebd+4HE=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=uRSxr+B1t4lucZ8t1nz5dUdI5RLrmAN7zBkJcjRZomTZczNlnsCph4VqjJbFR+FLg CzLNKzTqyrd/6gt34tUnWBk9AyjynzPU6NroVh8v9ySUxD+3mDhzYEUcA+rHnaur7M 1J6VnHryn+v2EvtSOEa9y1u5C+9bAEXs9Af4Zlsg= Received: by ieak13 with SMTP id k13so3571710iea.19 for ; Thu, 20 Sep 2012 08:14:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.91.162 with SMTP id cf2mr2007674igb.40.1348154097838; Thu, 20 Sep 2012 08:14:57 -0700 (PDT) Received: by 10.231.246.65 with HTTP; Thu, 20 Sep 2012 08:14:57 -0700 (PDT) In-Reply-To: References: Date: Thu, 20 Sep 2012 11:14:57 -0400 Message-ID: From: Benjamin Peterson To: Mark Dickinson Cc: "Python-...@python.org" Subject: Re: [Python-Dev] TypeError: f() missing 1 required positional argument: 'x' X-BeenThere: python-...@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Python core developers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: python-dev-bounces+dev-python+garchive-30976=googlegroups....@python.org Sender: "Python-Dev" 2012/9/20 Mark Dickinson : > And excepting optional ones, too, right? E.g., the c in > > def foo(a, b, c=1, *args, d): > pass > > can be passed to by position, but isn't "positional". Why not? >>> def f(a, b, c=3): pass ... >>> f() Traceback (most recent call last): File "", line 1, in TypeError: f() missing 2 required positional arguments: 'a' and 'b' >>> f(1, 2, 3, 4) Traceback (most recent call last): File "", line 1, in TypeError: f() takes from 2 to 3 positional arguments but 4 were given -- Regards, Benjamin _______________________________________________ Python-Dev mailing list Python-...@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/dev-python%2Bgarchive-30976%40googlegroups.com