Josiah Carlson wrote: > Up until this morning I was planning on writing everything such that > constructive manipulation (upper(), __add__, etc.) returned views of > strings.
I was about to say that this would be completely pointless, when I realised the point is so that further operations on these results would return views of them. In Josiah's views-always-return-views world, that would actually make sense -- but only if we really wanted such a world. To my mind, the use of views is to temporarily call out a part of a string for the purpose of applying some other operation to it. Views will therefore be short-lived objects that you won't want to keep and pass around. I suspect that, if views are the default result of anything done to a view, one will almost always be doing a str() on the result to turn it back into a non-view. If that's the case, then returning views would be the wrong default. -- Greg _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
