SimplePrograms challenge

Steve Howell showell30 at
Wed Jun 20 18:03:17 CEST 2007

--- Pete Forman <pete.forman at> wrote:

> Steve Howell <showell30 at> writes:
>  > Feel free to change the page as you see fit,
> although thanks for
>  > discussing it here first.
> Done.  I've moved classes up as unittest depends on
> it.
> The changes that I made to classes were:
> 1) Use new style class.
> 2) Demonstrate Pythonic use of attribute (no
> get/set).
> 3) Pare some lines.
> -- 


Here's the link, if anybody wants to kibitz:

My comments:

   1) I'm not crazy about having to inherit from
object for such a simple class, but I understand that
it's best practice.
   2) I'm glad you moved the class example up.

   3) The median example raises the question of what
would happen with an empty list.  I don't think it's
important to cover that case in the simple example
(it's really the responsibility of the caller IMO not
to call median with nonsense arguments), but perhaps
there is a simple way to fix this?

   4) Agreed on Pythonic use of the "balance"

Shape Yahoo! in your own image.  Join our Network Research Panel today! 

More information about the Python-list mailing list