Strange list problem
Gustaf Liljegren
gustafl at algonet.se
Wed Aug 21 16:46:09 EDT 2002
Sorry for that bad subject; it's hard to describe this problem. I get list
items instead of strings from the following operation:
# Extract links for web pages
def getLinksHTML(self):
if self.refs:
...
for a in self.refs:
print a
So 'a' here returns values like ['http://www.python.org'] instead of normal
strings. I know this isn't the normal behavior, but I don't know what might
cause it. Any ideas?
Since I need to change case here, I had to make the following work-around:
a = str(a)
a = a.lower()
But it would be better to get strings in the first place of course.
Gustaf
More information about the Python-list
mailing list