fixed. ;-)
On Aug 20, 12:25 pm, Jonathan Lundell <[email protected]> wrote: > On Aug 20, 2010, at 10:17 AM, mdipierro wrote: > > > 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() > > > > > > > > > Massimo > > > On Aug 20, 11:31 am, Jonathan Lundell <[email protected]> wrote: > >> On Aug 20, 2010, at 9:22 AM, Jonathan Lundell wrote: > > >>> 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__() > > >>> def __add__(self,other): > >>> return '%s%s' % (self,other) > > >>> def __radd__(self,other): > >>> return '%s%s' % (other,self) > > >>>> you would have to do > > >>>> 'http://127.0.0.:8000%s'%URL(..) > > >>>> we cannot have it both ways.

