Showing content from http://mail.python.org/pipermail/python-dev/attachments/20051228/be413cce/attachment.htm below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>RE: [Python-Dev] Keep default comparisons - or add a second set?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Noam Raphael wrote:<BR>
> I don't think that every type that supports equality<BR>
> comparison should support order comparison. I think<BR>
> that if there's no meaningful comparison (whether<BR>
> equality or order), an exception should be raised.<BR>
<BR>
Just to keep myself sane...<BR>
<BR>
def date_range(start=None, end=None):<BR>
if start == None:<BR>
start = datetime.date.today()<BR>
if end == None:<BR>
end = datetime.date.today()<BR>
return end - start<BR>
<BR>
Are you saying the "if" statements will raise TypeError if start or end are dates? That would be a sad day for Python. Perhaps you're saying that there is a "meaningful comparison" between None and anything else, but please clarify if so.<BR>
<BR>
<BR>
Robert Brewer<BR>
System Architect<BR>
Amor Ministries<BR>
fumanchu@amor.org</FONT>
</P>
</BODY>
</HTML>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4