Generators as "Array Initializers" #48623
Labels
design
Design of APIs or of the language itself
domain:arrays
[a, r, r, a, y, s]
kind:duplicate
Indicates similar issues or pull requests
kind:feature
Indicates new feature / enhancement requests
(Related Discourse discussion)
This would be nice:
Would passing generators to the
Array
constructor be redundant with comprehensions? Yes. Why request it then? Because a) it'd create consistency with the fact that other similar constructors also accept generators (e.g.Tuple
,NamedTuple
,Dict
, etc.), and b) it creates an idiom for non-standard arrays to be constructed with generators.The text was updated successfully, but these errors were encountered: