[egenix-users] cmp() function

Dirk Holtwick holtwick at spirito.de
Mon Dec 19 14:53:11 CET 2005


Hi,

in mx.DateTime there is a function called "cmp". Described like this in
the documentation:

"... There is a special compare function included (cmp()) in the package
that allows you to compare two date/time values using a given accuracy,
e.g. cmp(date1,date2,0.5) will allow 12:00:00.5 and 12:00:01.0 to
compare equal."

I think this function conflicts with the system function cmp() used e.g.
by sort() if you import DateTime like this:

from mx.DateTime import *

Would'nt it be better to name it "datecmp" or similar or a least
implement a fallback to the system cmp function instead of raising an
exception?

Bye,
Dirk Holtwick

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

spirito GmbH
Dirk Holtwick
Grünstraße 6
D-47051 Duisburg

mbx:   holtwick at spirito.de
web:   http://www.spirito.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: holtwick.vcf
Type: text/x-vcard
Size: 304 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20051219/1cea9010/holtwick-0138.vcf


More information about the egenix-users mailing list