On Apr 30, 2011, at 11:13 PM, Massimo Di Pierro wrote: > > I am not convinced about tab. I hate tab, it only causes problems.
In Python it does, but it solves problems elsewhere. I don't know what the expected use case is for CLEANUP; I don't see it used anywhere in the web2py apps. It might also be useful (and trivial) to add an option to pass in the retained character set as a string, or as a compiled regex. > > On May 1, 12:29 am, Jonathan Lundell <jlund...@pobox.com> wrote: >> On Apr 25, 2011, at 7:46 PM, Massimo Di Pierro wrote: >> >> >> >>> I agree. >> >> Perhaps tab should be retained as well. >> >> >> >> >> >> >> >> >> >>> On Apr 25, 8:59 pm, Jonathan Lundell <jlund...@pobox.com> wrote: >>>> On Apr 25, 2011, at 6:49 PM, Massimo Di Pierro wrote: >> >>>>> True. It should do what the book says. >> >>>> Except that we should probably change the definition to exclude 127, seems >>>> to me. >> >>>>> On Apr 25, 6:43 pm, pbreit <pbreitenb...@gmail.com> wrote: >>>>>> CLEANUP() seems to be removing more characters than the Book would >>>>>> suggest. >> >>>>>> "It just removes all characters whose decimal ASCII codes are not in the >>>>>> list [10, 13, 32-127]" >> >>>>>> However the regex is '[^ \n\w]' which I think is more like alphanumeric >>>>>> plus >>>>>> underscore. Is that right?