+1 for the PEP in general from me, but using the underscore based pseudo-namespace for the median variants.

The attribute approach isn't *wrong*, just surprising enough that I think independent functions with the "median_" prefix in their name is a better idea.

Cheers,
Nick.