[Python-Dev] file() vs open(), round 7
M.-A. Lemburg
mal at egenix.com
Tue Dec 27 14:20:23 CET 2005
Fredrik Lundh wrote:
> Aahz wrote:
>
>> class file(object)
>> | file(name[, mode[, buffering]]) -> file object
>> |
>> | Open a file. The mode can be 'r', 'w' or 'a' for reading (default),
>> [...]
>> | Note: open() is an alias for file().
>>
>> This is confusing. I suggest that we make ``open()`` a factory function
>> right now. (I'll submit a bug report (and possibly a patch) after I get
>> agreement.)
>
> +1.
>
> can we add a opentext factory for file/codecs.open while we're at it ?
Why a new factory function ? Can't we just redirect to codecs.open()
in case an encoding keyword argument is passed to open() ?!
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Dec 27 2005)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the Python-Dev
mailing list