I am getting the absolute weirdest Python behavior possible and I cannot for the life of me figure it out. With any luck, someone out here has an idea of what's going on.
I am looping the following method:
def request_hiscores_for(name):
print '+++++ request_hiscores_for() running +++++'+name
print type(name)
print ' Requesting hiscores for $name using request_hiscores_for()'.replace('$name',name)
print ' Requesting hiscores for '+name+' using request_hiscores_for()'
print ' Requesting hiscores for $name using request_hiscores_for()'.replace('$name','BLA')
print '----- request_hiscores_for() ending ------\n'
and am getting output along the following lines:
+++++ request_hiscores_for() running +++++10032
<type 'str'>
using request_hiscores_for()32
using request_hiscores_for()32
Requesting hiscores for BLA using request_hiscores_for()
----- request_hiscores_for() ending ------
+++++ request_hiscores_for() running +++++123 Lvs 2 Go
<type 'str'>
using request_hiscores_for() Lvs 2 Go
using request_hiscores_for() Lvs 2 Go
Requesting hiscores for BLA using request_hiscores_for()
----- request_hiscores_for() ending ------
I'd like to point out how the string concatenation is quite literally making parts of the string disappear, and somehow concatenating the arguments in a different order. So... help would be appreciated.
namefrom?'{}'.format(name)or%s' %(name)'10032'I do not get any logical error. Unable to reproduce your problem.