Message22526
Logged In: YES
user_id=80475
Perhaps I've been using it for too long, but I do not find
the error message to misleading. Also, I like having this
method as simple and lightweight as possible though it may
be worthwhile to add a line to the docs, "If the sequence is
emtpy, raises a TypeError."
If someone accepts this request, it should implemented as a
try/except rather than an assertion. That approach would
also let you catch TypeErrors raised is the argument doesn't
define __len__ and __getitem__, for example:
random.choice(set('abc'))
|
|
Date |
User |
Action |
Args |
2007-08-23 14:26:24 | admin | link | issue1033038 messages |
2007-08-23 14:26:24 | admin | create | |
|