Message190465
So you aren't really asking for a default, you are asking for a version of max/min that returns a sentinel instead of raising an error on an empty list. You could just write utility function that has a try/except in it. I'm not sure it is worth complicating min and max for this use case. (I'm not sure it isn't, either.) I wonder if we have any other functions in python that have an argument that turns a ValueError into a sentinel-return instead? |
|
Date |
User |
Action |
Args |
2013-06-02 02:43:29 | r.david.murray | set | recipients:
+ r.david.murray, twouters, Julian |
2013-06-02 02:43:29 | r.david.murray | set | messageid: <1370141009.23.0.124894170407.issue18111@psf.upfronthosting.co.za> |
2013-06-02 02:43:29 | r.david.murray | link | issue18111 messages |
2013-06-02 02:43:28 | r.david.murray | create | |
|