On Fri, Oct 15, 2010 at 9:19 PM, Albert Hopkins <[email protected]> wrote:
> On Fri, 2010-10-15 at 19:55 +0300, Fatih Tümen wrote:
>> > This is a bug... shuld be more something like:
>> >
>> > uris.append(syncuri.replace(
>> > "//%s%s%s/" % (user_name, hostname, port),
>> > "//%s%s%s/" % (user_name, ip, port), 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