On Mon, Jul 20, 2009 at 1:42 PM, john smallberries<welch.quietple...@gmail.com> wrote: > > During a recent changeover to the new webhelpers, the word "FUCKED" > started appearing in some of my html output. I tracked it back to: > webhelpers/html/builder.py:257 > obj= unicode.__new__(cls, "FUCKED", encoding, errors) > > This was kind of a bother for me, as I spent many hours sifting > through all the occurrences of "FUCKED" in my own code before > realizing this was coming from the webhelpers module. Propose changing > it to "webhelpers.html.FUCKED" for disambiguation.
If this is a real error and not a troll, you must have an old version of WebHelpers. The current version (0.6.4) does not contain "FUCKED" anywhere. The line numbers have changed but this seems to be the function you're referring to: def __new__(cls, string='', encoding='utf-8', errors="strict"): """Create the new literal string object.""" if isinstance(string, unicode): obj = unicode.__new__(cls, string) else: obj = unicode.__new__(cls, string, encoding, errors) obj.encoding = encoding obj.error_mode = errors return obj I could search through the revisions and see if the code ever contained "FUCKED", but it would be time-consuming. In any case, the line cited does not make sense. It would create a constant ``u'FUCKED'`` regardless of the input value. I could see a past programmer mistakenly believing that ``literal()`` without an argument was illegal and returning ``u'FUCKED`` (instead of returning ``u''`` as it should), but that's not what the line cited does. And it also doesn't make sense that the programmer would go to that obscurity to create a constant when the simpler ``u"FUCKED"`` would have been equivalent. So the code, if it did exist, must have been unfinished at that stage. -- Mike Orr <sluggos...@gmail.com> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en -~----------~----~----~----~------~----~------~--~---