Le Saturday 02 August 2008 00:51:50 Clay Hobbs, vous avez écrit :
The main point with open I think is to easy later evolution. While you could
override "file" name as well as "open" by a custom funcion, it's a bad idea
to override the name of the type because a simple isinstance(file _, file)
won't work anymore if you do so.
--
_____________
Maric Michaud
It is also a good idea to open files with the open() function and not the
file() function. They do the exact same thing, and take the exact same
parameters, just open() makes your code a bit more readable (or at least
that's what I think).
file() function. They do the exact same thing, and take the exact same
parameters, just open() makes your code a bit more readable (or at least
that's what I think).
override "file" name as well as "open" by a custom funcion, it's a bad idea
to override the name of the type because a simple isinstance(file _, file)
won't work anymore if you do so.
--
_____________
Maric Michaud