__sub__ for string

Steve Holden sholden at holdenweb.com
Fri Apr 13 06:43:02 EDT 2001


"Andrew Dalke" <dalke at acm.org> wrote in message
news:9b6k5g$ccg$1 at slb5.atl.mindspring.net...
> Rikard Bosnjakovic:
> > (a + b) - b == a
> >
> >that won't occur if I do it my way.   Oh well, just a though.
>
> Then for completeness (not that I'm proposing it!)
>
>   "ab ab ab " / "ab " == 3
>
> Since 5/2 == 2, this would also mean
>
>   "ababa" / "ab" == 2
>
> And if Python 3K makes 5/2 == 2.5 then this becomes true
>
>   "ababa" / "ab" == 2.5
>
> So what does "abc" / "ab" equal?
>
cheese

regards
 Steve






More information about the Python-list mailing list