Clashing cmp

François Pinard pinard at iro.umontreal.ca
Tue Sep 21 13:29:09 EDT 1999


Hi, people.

There is a builtin function named `cmp', but there is also an importable
module `cmp' in the standard library.  After a mere `import cmp' (I prefer
to avoid `from cmp import SUCH-and-SUCH' if I may), I feel forced to write
`__builtins__.cmp' to access the builtin function.

This does not look very elegant to me.  Would not it be better if such
elementary clashes were avoided, at least within the standard distribution?

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list