Fixed mx.DateTime or alternative?
Chuck Esterbrook
ChuckEsterbrook at yahoo.com
Mon Jul 9 09:00:26 EDT 2001
At 01:15 PM 7/9/2001 +0200, M.-A. Lemburg wrote:
>Side note:
>
> if x is None: ...
>
>is a possible workaround which is faster than using "==" !
I switched to that, but then there is this left over:
if a==b:
where a and b are literally variables and could both be DateTimes, but one
of them ends up being None and the exception occurs. Someone suggested I
could use:
if str(a)==str(b):
although before I got that suggestion, I just wrapped it with a try: and
assumed inequality.
-Chuck
More information about the Python-list
mailing list