[Skip] > Perhaps a stupid observation, but empty lists, dicts, strings and > tuples appear to compare larger than any int or float: Why do you presume it's numbers that are getting compared in a min/max search loop? Sometimes it's tuples, sometimes lists, sometimes strings, sometimes instances of a user-defined class (etc). > ... > I realize this is implementation-dependent (and I'm sure Tim already > knows all this stuff). People wanting absolute min and max objects > could use something like the above to generate such stuff when needed. Sorry, they can't. If so happens that every string compares less than every tuple -- you really expect sensible code to be written that way? The brittleness compounds if you try. Extending that example, it so happens that every Unicode string compares *larger* than every tuple, so apart from the inherent obscurity of relying on accidental crap like that, it can break when your input data changes a little.
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