def bug():
a='xxxxxxxxxxxxxxxxx '
b='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
bug1(a,b)
b=b+'x'
bug1(a,b)
def bug1(a,b):
str='#band(%s) #band(%s%s)' % (a,a,b)
print str
bug()
What you get is:
#band(xxxxxxxxxxxxxxxxx ) #band(xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#band(xxxxxxxxxxxxxxxxx ) #band(xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
>>>
Note: in the second call to bug1, you correctly get the ) at the end.
In the first case (with the b string shorter by 1 character), you don't!!!!!!
This bug is very sensitive to string lengths. If you get the right lengths,
the bug appears.
--- Steven T. Kirsch InfoSeek Corporation 2620 Augustine Dr #250 Santa Clara, CA 95054 stk@infoseek.com (408) 982-4463 FAX: (408) 986-1889