On 2/14/06, Just van Rossum <[EMAIL PROTECTED]> wrote: ... > Maybe it's even better to use opentext() AND openbinary(), and deprecate > plain open(). We could even introduce them at the same time as bytes() > (and leave the open() deprecation for 3.0).
What about shorter names, such as 'text' instead of 'opentext' and 'data' instead of 'openbinary'? By eschewing the 'open' prefix we might make it easy to eventually migrate off it. Maybe text and data could be two subclasses of file, with file remaining initially as it is (and perhaps becoming an abstract-only baseclass at the time 'open' is deprecated). In real life, people do all the time use 'open' inappropriately (on non-text files on Windows): one of the most frequent tasks on python-help has to do with diagnosing that this is what happened and suggest the addition of an explicit 'rb' or 'wb' argument. This unending chore, in particular, makes me very wary of forever keeping open to mean "open this _text_ file". Alex _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com