
Sept. 6, 2009
5:51 a.m.
Nick Coghlan wrote:
That said, I'm -0 on the idea overall. If someone actually needs it, it isn't particularly hard for them to write their own getany() function.
There's a situation where the need to do this kind of thing actually arises fairly frequently -- retrieving things from a relational database. Often you're expecting exactly one result from a query, but the API always gives you a sequence, which you then have to get the first item from. Doing that over and over again gets rather tedious. -- Greg