On Sep 28, 3:57 am, mer...@stonehenge.com (Randal L. Schwartz) wrote: > >>>>> "Xah" == Xah Lee <xah...@gmail.com> writes: > > Xah> curious question. > Xah> suppose you have 300 different strings and they need all be replaced > Xah> to say "aaa". > > And then suppose this isn't the *real* question, but one entirely of > Fiction by Xah Lee. > > How helpful do you want to be?
it's a interesting question anyway. the question originally came from when i was coding elisp of a function that changes html entities to unicode char literal. The problem is slightly complicated, involving a few questions about speed in emacs. e.g. string vs buffer, and much more... i spent several hours on this but it's probably too boring to detail (but i'll do so if anyone wishes). But anyway, while digging these questions that's not clear in my mind, i thought of why not generate a regex or construct and do it in one shot, and wondered if that'd be faster. But afterwards, i realized this wouldn't be applicable to my problem because for my problem each string needs to be changed to a unique string, not all to the same string. Xah -- http://mail.python.org/mailman/listinfo/python-list