On Fri, Dec 11, 2009 at 3:12 PM, Carsten Haese <carsten.ha...@gmail.com>wrote:
> Victor Subervi wrote: > > [...] if I go to print, say, > > colFieldValues[20], which is a set, it prints out the whole set: > > set('Extra-small','Small','Medium','Large','XLarge','XXLarge','XXXLarge') > > But if I print out colFieldValues[20][0], it prints out "s". > > The only reasonable explanation of this behavior is that despite all > your wishing for it to be a set, colFieldValues[20] is in fact not a > set, but rather a string. It is a string containing the letter s, > followed by the letter e, followed by the letter t, followed by an > openening parenthesis, and so on. > > > Also, how can I test > > for it? It's an instance of string. How do I know if it's a set? > > That's a fantastic question. Python thinks it's a string. What makes you > think it's a set? > Right. I'm doing it the ugly way with the truncating tuple and string replace. V
-- http://mail.python.org/mailman/listinfo/python-list