Quote:
Originally Posted by capink
I overlooked this, Thanks for the fix.
|
I looked at that code at least 20 times before I saw it.
Quote:
I am thinking about going with re.sub() in case the user enters a wrong prefix. It will be slower though.
|
I don't understand what re.sub() would fix. The dict comprehension on line 5 ensures that the key starts with the user_cat_prefix so removing len(user_cat_prefix) characters from the key (user_cat) can't do the wrong thing. What am I missing?