A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-November/040149.html below:

[Python-Dev] other "magic strings" issues

[Python-Dev] other "magic strings" issues [Python-Dev] other "magic strings" issuesMichael Hudson mwh at python.net
Mon Nov 10 10:56:01 EST 2003
Guido van Rossum <guido at python.org> writes:

>> I think I prefer Guido's idea that when a function argument is almost
>> always constant you should really have two functions and /F's (?)
>> idea that there should be a 'textfile' function:
>> 
>>     textfile(path[, mode='r'[, encoding='ascii']]) -> file object
>> 
>> or similar.
>
> I'm not so sure about that in this case.  There are quite a few places
> where one writes a wrapper for open() that takes a mode and passes it
> on to the real open().

I may just be being thick today but I can't think of many.  Most of
the time passing in an already on file object would be better
interface, surely?  Well, there's things like the codec writers, but
textfile would hopefully subsume them.

> Having to distinguish between multiple open() functions would
> complexify this.
>
> OTOH my experimental standard I/O replacement (nondist/sandbox/sio)
> does a similar thing, by providing different constructors for
> different functionality (buffering, text translation, low-level I/O
> basis).

Does text translation cover unicode issues here?

Cheers,
mwh

-- 
  Never meddle in the affairs of NT. It is slow to boot and quick to
  crash.                                             -- Stephen Harris
               -- http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.html

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4