On 11/22/06, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Steven Bethard wrote:
> > So I would have expected something like:
> >
> >     str.lower[MyStringType] = MyStringType.lower
> >     str.split[MyStringType] = MyStringType.split
>
> But that would only work if everyone switched to
> writing str.lower(s) everywhere instead of s.lower(),

I don't think so, but perhaps I misunderstood the proposal.  I thought
it would just rely on someone defining a String Interface as the union
of ``str.lower``, ``str.split``, etc.  Then to figure out what to do
with your ``string_or_list`` argument, you'd test it against this
String Interface. You could then freely make calls like ``s.lower()``,
knowing that they were calling the equivalent of ``str.lower()``.

Steve
-- 
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
        --- Bucky Katt, Get Fuzzy
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to