6

I came across this helpful post about lambda function closures in Python entitled What do (lambda) function closures capture in Python?.

The accepted and most voted answer references an earlier answer (by stating that the second question had been answered). As I'm lazy, I toggled the "Oldest" tab in order to sort the answers by posting time. However, the same answer came up on top.

Here's the thing though, that answer isn't the first. As shown by the timestamps, the earliest answer given was by Chris Lutz, at Feb 19 '10 at 9:55, and yet it shows in second to the most voted answer, which is timestamped Feb 19 '10 at 9:58 (so there's roughly a 3 minute difference between them).

It isn't a Fastest Gun in the West kind-of problem (reloading doesn't change the order). To check if this applies to other questions I quickly searched for a high-voted question and I found this, where again the accepted answer sits on top, although it isn't the first one (albeit the difference here is a mere 2 seconds).

As I'm noticing a pattern here (the accepted answer always gets on top) and I didn't find anything regarding this topic, I ask if this situation is actually a bug or if it is as planned.

4
  • The accepted answer (unless answered by the question asker) is always on top, no matter the ordering.
    – gunr2171
    Commented Jul 16, 2014 at 2:56
  • As soon as I posted this I recalled that nuance I've read somewhere but surprisingly I haven't been able to pinpoint a source for that. Commented Jul 16, 2014 at 2:58
  • Start with this:meta.stackexchange.com/questions/127231/… , and so you know, I find it really hard to find "official" documentation for this sort of thing on meta.
    – gunr2171
    Commented Jul 16, 2014 at 2:59
  • I did search before to make sure I wasn't asking what has been asked before, but sometimes the keywords used do make a big difference. Anyway, continuing the search, I did find this great Meta.SE post, which does explain a little why the accepted answer gets pinned regardless of sorting. It seems this issue has come when the "accepted answer" mechanism was implemented. A note though, OP's self-accepted don't get pinned, according to the blog post. Commented Jul 16, 2014 at 3:17

1 Answer 1

3

As others have said, the accepted answer is (almost) always first.

The only exception is a self answered accepted answer, if there are other answers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .