A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-December/059218.html below:

[Python-Dev] Keep default comparisons - or add a second set?

[Python-Dev] Keep default comparisons - or add a second set? [Python-Dev] Keep default comparisons - or add a second set?Robert Brewer fumanchu at amor.org
Wed Dec 28 23:01:09 CET 2005
Noam Raphael wrote:
> I don't think that every type that supports equality
> comparison should support order comparison. I think
> that if there's no meaningful comparison (whether
> equality or order), an exception should be raised.

Just to keep myself sane...

    def date_range(start=None, end=None):
        if start == None:
            start = datetime.date.today()
        if end == None:
            end = datetime.date.today()
        return end - start

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.


Robert Brewer
System Architect
Amor Ministries
fumanchu at amor.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20051228/be413cce/attachment.htm
More information about the Python-Dev mailing list

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