[Python-Dev] Proposal for new core module: UserFIle

Martin v. Löwis martin at v.loewis.de
Fri Dec 12 17:55:38 EST 2003


Keith Dart <kdart at kdart.com> writes:

> Attached is a module provides enhanced functionality for file objects.

If you want your code to be included in Python, posting it to
python-dev may not be a good idea - it is, in fact, a guarantee that
it will *not* be included. Instead, all patches should go to
sf.net/projects/python.

That is not a guarantee that it will be included, either. This module
(UserFile) puts together way too many individual feature to allow a
meaningful review.

Looking at a single class alone (UserFile), my review would be this:

1. What is the purpose of hiding EINTR?
2. Many of the os wrappers should be methods on the file object,
   if they are useful in the first place (e.g. ttyname, fstat,
   dup)
3. This code might not be universally work on all supported systems;
   this should be addressed somehow.
4. There is no documentation.
5. There are no test cases.

Regards,
Martin



More information about the Python-Dev mailing list