Quote:
Originally Posted by meme
Ok, I've currently implemented this so that if you import collections and the collection name has a "," in it (after the first occurrence of a-zA-Z), I convert the "," to a "\" before loading it into the custom column.
|
What happens if I am using non-ascii characters? For example, what happens if the collection name is "й,зиц"? Or if the name is "1001,dalmations"? There are no a-zA-Z characters in the first string, and there are none before the comma in the second string.
I think that you want to do 'foo.strip(',').strip()' before processing an item. That will remove any leading or trailing whitespace, then remove any leading or trailing commas.