[Python-3000] Making more effective use of slice objects in Py3k

Barry Warsaw barry at python.org
Tue Aug 29 23:37:16 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Aug 29, 2006, at 5:01 PM, Jim Jewett wrote:

> Why is it essential that string views be a different type, rather than
> an internal implementation detail, like long vs int?  Today's strings
> can already return a new object or an existing one which happens to be
> equal.
>
> Is this just a matter of efficiency, or are you making a fundamental
> distinction?

This is a good question.  I haven't been following this thread in  
detail, but ISTM that users shouldn't care and that the object itself  
should do whatever makes the most sense for the most general  
audience.  I'm eager to never have to worry about 8-bit strings vs.  
unicode strings, how they mix and match, and all the nasty corners  
when they interact.  I'd hate to trade that for the worry about  
whether I have a string or a string-view.

- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iQCVAwUBRPSzjXEjvBPtnXfVAQJ3WAQAuLgT0yOfIo7gNcg7BS0hvKMb33e9Pbdi
IQdlP0seSt6Q0GXMnCk2DPJdXHAap2co/RnqRXuavqAcJScYBwM626tHppjrgoDV
fcQ6FBn1oshsOSChKIT1tVqiudPiEStWaks6d/xg4yP1EAOEbqEhaGoR3FM7e+Vh
h/d6rtxYaXk=
=XQCo
-----END PGP SIGNATURE-----


More information about the Python-3000 mailing list