Steven D'Aprano wrote: > With a length hint, we could strengthen that promise: > > "if __length_hint__ returns a negative number, list, tuple and set will > fail immediately with MemoryError" > > which I think is a good safety feature for some things which cannot > possibly succeed, but risk DOSing your system. Does it prevent every > possible failure mode? No, of course not. But just because you can't > prevent *every* problem doesn't mean you should prevent the ones which > you can. Gah, I messed that last sentence up. It should read: just because you can't prevent *every* problem doesn't mean you SHOULDN'T prevent the ones which you can. -- Steven
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