> I changed and changed back. I am waiting for comments form other
> developers. I am not sure what the best course of action is.
What's an example of the framework breakage using the helper form of URL?
> In trunk, I modified the definition of URL so that it returns the
> XML(..) helper wrapping the string. This will prevent
>
> {{=URL(...)}}
>
> from double escaping but will prevent you from doing
>
> 'http://127.0.0.:8000'+URL(..)
Couldn't this be fixed by implementing URL.__radd__() ?
def __add__(self,other):
return '%s%s' % (self,other)
def __radd__(self,other):
return '%s%s' % (other,self)
> On Aug 19, 2010, at 6:38 PM, mdipierro wrote:
>
>> In trunk, I modified the definition of URL so that it returns the
>> XML(..) helper wrapping the string. This will prevent
>>
>> {{=URL(...)}}
>>
>> from double escaping but will prevent you from doing
>>
>> 'http://127.0.0.:8000'+URL(..)
>
> Couldn't this be fixed by implementing URL.__radd__() ?
I meant XML.__radd__()
> I did as you suggest. I also had to add lower(), upper() and __len__
> methods to the XML class.
> I think this is a good solution. Thanks Jonathan.
oops:
+ def upper(self):
+ return str(self).lower()