-4

This question was closed as "unclear what you are asking":

How to copy a dictionary using the Python C API

The question:

  • Was about programming
  • Had a clear answer (given, I did not know it at the time, but was given in a comment)
  • Was specific in meaning (a Python dictionary, and the Python C API is reasonable to reference)

And yet it was closed. I'm sorry, but I think that the only reason that it was closed is that it had an answer that was too easy to find. But to someone unfamiliar with much of the C API, I think it's useful.

Might someone please provide an alternate explanation? Or... Failing that, vote to reopen that question?

13
  • idownvotedbecau.se/noeffort idownvotedbecau.se/noresearch both highlight the issues with questions like this and why they are seen to be worth a downvote (and what to do about it). Also, someone from the python tag was in here a few days ago complaining about the numbers of questions like this that are pollu... er, proliferating in the tag, disenchanting experienced users, making them less likely to want to help answer questions.
    – user1228
    Commented Dec 1, 2017 at 18:36
  • @Will the issue is that the Python C API is different than just Python, in fact almost completely different. But there's no specific tag for it.
    – xaav
    Commented Dec 1, 2017 at 18:39
  • You don't seem to understand. Go re-read my comment and visit the links. Note that they speak about "no effort" and "no research".
    – user1228
    Commented Dec 1, 2017 at 18:40
  • Is effort or research other than a check for duplicates required to post a question? One of the guidelines is that you can post a question and then detail your efforts to answer it. At least that's what I remember when signing up.
    – xaav
    Commented Dec 1, 2017 at 18:45
  • Yes, you should always research and try to answer your question prior to posting it on SO. The help center specifically states this (find the link on the /noresearch page).
    – user1228
    Commented Dec 1, 2017 at 18:48
  • See meta.stackoverflow.com/questions/340608/… second comment.
    – xaav
    Commented Dec 1, 2017 at 18:51
  • Help center > some comment on a meta question.
    – user1228
    Commented Dec 1, 2017 at 18:54
  • The help center doesn't specifically say that research is needed. It simply states that "to improve your chances of getting an answer, search and research." And the first part of that is specifically about searching stackoverflow, which I did.
    – xaav
    Commented Dec 1, 2017 at 19:09
  • Okay, buddy. You're right, I'm wrong. You keep up the good work. Good luck, and good day to you, sir.
    – user1228
    Commented Dec 1, 2017 at 19:10
  • Also, this meta question wasn't even about downvoting the question (which may be appropriate given its relevance). The meta question was about the votes to close the question.
    – xaav
    Commented Dec 1, 2017 at 19:15
  • I SAID GOOD DAY.
    – user1228
    Commented Dec 1, 2017 at 19:21
  • Research is not required, but it is expected. See How much research is expected on SO. Not enough research is no reason to close a question (though low-research questions are often unclear/broad and that is a reason), but it certainly is a valid reason to downvote.
    – Erik A
    Commented Dec 4, 2017 at 16:30
  • Agreed. But people still voted to close the question after it was reopened. IMO this is wrong.
    – xaav
    Commented Dec 4, 2017 at 16:34

3 Answers 3

10

I dislike questions asking for the best way, since any answer that's not the absolute best would be wrong, and often vote to close on them (mostly too broad/opinion based).

In your question, people who assume PyDict_Copy is common knowledge and you're asking for a better way may think your question is unclear, especially since you don't provide any code, and haven't specified what's wrong with it.

A better way to ask this question would be to just ask for a way to do this in general:

Given a Python dictionary, how can I obtain a copy using the C API?

Usually, pressuring for quality (I want the best answer with all the options and super speed) doesn't go over well on Stack Overflow, especially if you're not sharing your existing solution.

3
  • 1
    OI! Jinx! Ninja'd by 18 seconds.
    – Makoto
    Commented Nov 30, 2017 at 21:17
  • Thanks, I did not intend the question to mean that, but I will revise it.
    – xaav
    Commented Nov 30, 2017 at 21:19
  • I revised the question.
    – xaav
    Commented Nov 30, 2017 at 21:22
9

The question, phrased as

Given a Python dictionary, what's the best way to obtain a copy using the C API?

...leaves itself open to allow people to submit answers and pontificate over what "best" is.

If rephrased as

Given a Python dictionary, how could I obtain a copy using the C API?

...it's not as broad, and could be eligible to be reopened. (This still leaves me with a weird feeling, though.)

2
  • 1
    I'm with you here -- I think it might still be voted closed as there's no "here's what I've tried" provided, and that tends to not be well-accepted, from what I've seen. Commented Nov 30, 2017 at 21:29
  • "This still leaves me with a weird feeling, though." - it should. Questions should be closed (or not) based on there substantive meaning, not the patterns of speech used to convey that meaning. If you agree with me that the two questions are practically the same (which I think you do, since in your own words the former has just been "rephrased" to produce the latter), then it makes no sense to be in favour of closing one but not the other; at that point you're policing language rather than substance.
    – Mark Amery
    Commented Dec 1, 2017 at 9:33
-4

This question should clearly not have been closed, in my opinion. There's clearly no substantive difference in most cases, including this one, between asking "How can I do X" and "What is the best way to do X?"; almost any answer that's valid on one will be equally valid on the other, and the same audience is going to click through to both from Google. That said, its closure was not entirely unpredictable, despite the lack of any practical difference in meaning between your original title and your edited one, since many close voters just vote based upon the phrase "the best" appearing in the title; it's prudent to avoid this happening in the future by not asking for the "best" way to do something.

But I've said all this before:

if a trivial rephrasing that doesn't change what the question is asking makes it clearly on-topic, then it's already on topic and nobody should be voting to close it. I get really annoyed when people vote to close "what do you reckon is the best way to foo the bar?" as "primarily opinion based" or "is there some tool I can use to foo the bar?" as a tool recommendation question even when "How can I foo the bar?" would be clearly on-topic and the other two are just that same question with slightly different language. But people do regularly close such questions, whether I like it or not, so editing them in ways that preserve their meaning but remove the arbitrary patterns of speech that the Nazi close voters object to is a sensible pragmatic measure to stop them from being closed.

3
  • 3
    Having edited out "what is the best way" several times and answering the question with the most trivial answer just to have an argument with the OP afterwards because he complained that my solution isn't the best makes me disagree with you. If you want just any solution: Ask for that. If you want the best solution: State how you measure best.
    – BDL
    Commented Dec 1, 2017 at 10:12
  • @BDL then we have been walking in different gardens; I've not once seen the outcome that you describe. Any pertinent examples?
    – Mark Amery
    Commented Dec 1, 2017 at 12:23
  • Not at hand. I'll add it here if I find one. It might also depend on which tags you frequent. I'm mostly active in the game development related ones (opengl, etc.), maybe the chance is higher there that people really ask for fastest/best/less memory using methods.
    – BDL
    Commented Dec 1, 2017 at 15:24

You must log in to answer this question.

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