Tim> squares = (f(x)**2 for x in inputs) # assuming reiterability here Tim> for f in math.sin, math.cos, math.tan: Tim> plot(squares) How much more expensive would this be than for f in math.sin, math.cos, math.tan: squares = (f(x)**2 for x in inputs) plot(squares) which would work without reiterability, right? The underlying generator function could still be created at compile-time and it (or its code object?) stored in the current function's constants. 'f' is simply an argument to it when the iterator is instantiated. Skip
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