Mark Dickinson added the comment: > My only objection is to having a class xyz such that isinstance(xyz(..), > xyz) is false.
Yep. Use a set of functions (median, median_low); use an instance of a class as Alexander describes; use a single median function that takes an optional "method" parameter; create a statistics.median subpackage and put the various median functions in that. Any of those options are fairly standard, unsurprising, and could reasonably be defended. But having `median` be a class whose `__new__` returns a float really *is* nonstandard and peculiar. There's just no need for such perversity in what should be a straightforward and uncomplicated module. Special cases aren't special enough to break the rules and all that. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18606> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com