[Python-Dev] thoughts on the bytes/string discussion (original) (raw)
Ian Bicking ianb at colorstudy.com
Fri Jun 25 18:54:05 CEST 2010
- Previous message: [Python-Dev] thoughts on the bytes/string discussion
- Next message: [Python-Dev] thoughts on the bytes/string discussion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Jun 25, 2010 at 11:30 AM, Stephen J. Turnbull <stephen at xemacs.org>wrote:
Ian Bicking writes:
> I'm proposing these specials would be used in polymorphic functions, like > the functions in urllib.parse. I would not personally use them in my own > code (unless of course I was writing my own polymorphic functions). > > This also makes it less important that the objects be a full stand-in for > text, as their use should be isolated to specific functions, they aren't > objects that should be passed around much. So you can easily identify and > quickly detect if you use unsupported operations on those text-like > objects. OK. That sounds reasonable to me, but I don't see any need for a builtin type for it. Inclusion in the stdlib is not quite a no-brainer, but given Guido's endorsement of polymorphism, I can't bring myself to go lower than +0.9 .
Agreed on a builtin; I think it would be fine to put something in the strings module, and then in these examples code that used '/' would instead use strings.ascii('/') (not sure so sure of what the name should be though).
-- Ian Bicking | http://blog.ianbicking.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20100625/9a846bd3/attachment.html>
- Previous message: [Python-Dev] thoughts on the bytes/string discussion
- Next message: [Python-Dev] thoughts on the bytes/string discussion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]