From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1P6pC6-0006Vu-6R for garchives@archives.gentoo.org; Fri, 15 Oct 2010 18:39:54 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 42540E086A; Fri, 15 Oct 2010 18:39:21 +0000 (UTC) Received: from mail-gx0-f181.google.com (mail-gx0-f181.google.com [209.85.161.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 252B3E086A for ; Fri, 15 Oct 2010 18:39:20 +0000 (UTC) Received: by gxk24 with SMTP id 24so999002gxk.40 for ; Fri, 15 Oct 2010 11:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:content-type:content-transfer-encoding; bh=H3zwwYDVaR9JQ687+ehSH1i2ZzQPh7C6on/wrHVqyuY=; b=DRbsPkyM13tBbwOmNBakx6l04C4yTSgEC0aINqreI1KIP0F/A1aU+8HQD/OzYl21nb NQUNGEqH/s9k7sgTGbvb2TTLOyGIrYmE2o4vW67o37cbkXgGFYs3IbcWhXPV8cSwKYTl xT+sfFn/1TAAlg3+R9eY9fEEOxFXqexpERY40= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=FVyHOxElU334NX4ovhq2t8mE1kRSzWTb4WbM4j7u6XbHkoaU3TADwFofVZaR4VkOAl R3O/Qe/fGt+A7I2G1G/q/M1nKugVtVQZ0tAVRG6qULgcZgGPvE9escqmFdNEzcDZDGl6 fTtwrSNzF4GjaPFsbLfgdPAysKPTs4Un1iFVw= Received: by 10.100.167.1 with SMTP id p1mr133827ane.136.1287167960478; Fri, 15 Oct 2010 11:39:20 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Sender: fthtmn@gmail.com Received: by 10.100.3.7 with HTTP; Fri, 15 Oct 2010 11:38:50 -0700 (PDT) In-Reply-To: <1287166766.21472.4.camel@paska> References: <1287160075.21472.3.camel@paska> <1287166766.21472.4.camel@paska> From: =?ISO-8859-1?Q?Fatih_T=FCmen?= Date: Fri, 15 Oct 2010 21:38:50 +0300 X-Google-Sender-Auth: S7EGIP02kY2gfR_9W2O6L_sNpgo Message-ID: Subject: Re: [gentoo-user] emerge/python failure To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 6478b117-04d2-47ec-b55b-5c90ee9c5ac6 X-Archives-Hash: 09fa5d05aa9757bd5a6cadd4dc213fa0 On Fri, Oct 15, 2010 at 9:19 PM, Albert Hopkins wr= ote: > On Fri, 2010-10-15 at 19:55 +0300, Fatih T=FCmen wrote: >> > This is a bug... shuld be more something like: >> > >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0uris.append(syncuri.replace( >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"//%s%s%s/" % (user_name, hostn= ame, port), >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"//%s%s%s/" % (user_name, ip, p= ort), 1)) >> > >> > Probably needs to be reported. >> > >> > >> > >> > >> >> Coding against PEP8 is not a bug. > > I was referring to the adding a string to an integer. > > > 1 was the count argument of replace, the third one (not second) and variables added together (concatenation) supposed to be string there. I think you got the wrong impression because of the line wrapping; traceback unfortunately prints the last (wrapped) line of the buggy statement/expression. That line belongs to the following block: for ip in ips: uris.append(syncuri.replace( "//" + user_name + hostname + port + "/", "//" + user_name + ip + port + "/", 1)) Seeing you changed the formatting style I thought your referring to suggested string formating in pep. Sorry. -- Fatih