In Python, I am also a huge fan of random.choice, which operates on any lenth-computable sequence. For Fan, I wouldn't mind a List.random which returned a random element of the (non-empty) list.
brianTue 5 May 2009
Promoted to ticket #574 and assigned to brian
will do, I'll add both List.random and Range.random
brianWed 6 May 2009
Renamed from Request: sys::Range.random to Request: Range.random, List.random
KevinKelley Tue 5 May 2009
No big deal, but I think having Range.random as a shortcut for Int.random(Range) seems nice:
It seems to fit the style of things like
which I like.
tactics Tue 5 May 2009
This seems like it would be pretty nice.
In Python, I am also a huge fan of random.choice, which operates on any lenth-computable sequence. For Fan, I wouldn't mind a List.random which returned a random element of the (non-empty) list.
brian Tue 5 May 2009
Promoted to ticket #574 and assigned to brian
will do, I'll add both List.random and Range.random
brian Wed 6 May 2009
Renamed from Request: sys::Range.random to Request: Range.random, List.random
brian Wed 6 May 2009
Ticket resolved in 1.0.42