Feature Requests item #1567948, was opened at 2006-09-29 11:51
Message generated for change (Comment added) made by hdiwan650
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1567948&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Submitted By: Hasan Diwan (hdiwan650)
Assigned to: Nobody/Anonymous (nobody)
Summary: poplib.py list interface

Initial Comment:
Adds a list-like interface to poplib.py, poplib_as_list.

----------------------------------------------------------------------

>Comment By: Hasan Diwan (hdiwan650)
Date: 2006-10-04 15:38

Message:
Logged In: YES 
user_id=1185570

I'm going to address your points top to bottom:
1. Fixed, you're right it should and does now.
2. The idea of a list wrapper is to serve as a convenient
interface to the most commonly used methods of a poplib
instance while hiding the underlying class(es).
3. Subclassing list was a mistake, I was merely trying to
provide an idea for the interface. Summarily removed.
4. __getslice__ fixed.
5. Unit tests will take a little longer because we need to
make a dummy poplib instances to test with.
6. __getattribute__ docstring dropped.
7. I don't know, should it?

----------------------------------------------------------------------

Comment By: Jp Calderone (kuran)
Date: 2006-10-04 14:13

Message:
Logged In: YES 
user_id=366566

Some review comments:

  * poplib_as_list should have a class docstring explaining
its purpose.  The name is fairly suggestive, but some prose
would be better.

  * Why duplicate the arguments to POP3_SSL and POP3 in
poplib_as_list.__init__?  Wouldn't it be better if it took
an already-constructed POP3 or POP3_SSL instance?

  * Does subclassing list really buy much here?  None of the
overridden methods upcall, and many list methods aren't
implemented here at all: what if someone calls pop on a
poplib_as_list instance?  Ditto for a bunch of other
operations that one might expect to work on a list.

  * __getslice__ is buggy - the return statement is indented
too far.  __getitem__ and __delitem__ will also pass a slice
instance on the underlying pop method when extended slices
are used.

  * segue from the previous comment - unit tests?  Python
has pretty low overall coverage, but all new code at least
can benefit from being committed initially with a
comprehensive test suite.

  * The docstrings on all of the methods that have them are
pretty good, although the __getattribute__ docstring is more
of an implementation note.

  * Should the library reference be updated as well?

Overall, I'm not sure how useful this feature is.  A generic
wrapper class would probably be beneficial to more people.


----------------------------------------------------------------------

Comment By: Hasan Diwan (hdiwan650)
Date: 2006-10-04 13:29

Message:
Logged In: YES 
user_id=1185570

I changed it a little bit, added my name at the top of the
file as the maintainer. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1567948&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to