Subclassing the min() build-in function?

Fredrik Lundh fredrik at pythonware.com
Wed Nov 6 13:35:24 EST 2002


Eddie Corns wrote:

> The last example shows that you might want to check whether 'a' is a sequence
> if that's ever likely to happen.  Using __builtins__.min is easier than making
> a local copy of the standard min which could have been done by:

never use __builtins__ -- it's an implementation detail.

to make sure you get the right builtins, import __builtin__ (no plural s) and
access the functions via that module.

</F>





More information about the Python-list mailing list