Gentoo Archives: gentoo-user

From: "Fatih Tümen" <fthtmn+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] emerge/python failure
Date: Fri, 15 Oct 2010 18:39:54
Message-Id: AANLkTin0ok-MK4vbFhMkpnUFd96DVj5cMQ1-1Z7Qbp-u@mail.gmail.com
In Reply to: Re: [gentoo-user] emerge/python failure by Albert Hopkins
1 On Fri, Oct 15, 2010 at 9:19 PM, Albert Hopkins <marduk@×××××××××××.org> wrote:
2 > On Fri, 2010-10-15 at 19:55 +0300, Fatih Tümen wrote:
3 >> > This is a bug... shuld be more something like:
4 >> >
5 >> >                uris.append(syncuri.replace(
6 >> >                    "//%s%s%s/" % (user_name, hostname, port),
7 >> >                    "//%s%s%s/" % (user_name, ip, port), 1))
8 >> >
9 >> > Probably needs to be reported.
10 >> >
11 >> >
12 >> >
13 >> >
14 >>
15 >> Coding against PEP8 is not a bug.
16 >
17 > I was referring to the adding a string to an integer.
18 >
19 >
20 >
21
22 1 was the count argument of replace, the third one (not second) and
23 variables added together (concatenation) supposed to be string there.
24 I think you got the wrong impression because of the line wrapping;
25 traceback unfortunately prints the last (wrapped) line of the buggy
26 statement/expression. That line belongs to the following block:
27
28 for ip in ips:
29 uris.append(syncuri.replace(
30 "//" + user_name + hostname + port + "/",
31 "//" + user_name + ip + port + "/", 1))
32
33 Seeing you changed the formatting style I thought your referring to
34 suggested string formating in pep. Sorry.
35
36 --
37 Fatih