The general case
Suppose a question asks
How can I solve [general problem] in Python? For instance, I would like... [some very specific case]
and I answer with the single sentence
Here is a package called [general problem solver] which seems to be suited for this purpose.
Is this considered to be a low-quality answer, and why?
My specific case
I'm asking to try to understand why this answer of mine was deleted. When posting, I thought my answer was especially good because it was so concise. To avoid deletions in the future, I'd like to understand where the reviewers are coming from. I'll feel much better about continuing to post if I share the understanding of what is widely-considered to be a good answer. As such, I elaborate my reasoning for posting what I wrote, in the hopes that someone can point out where my reasoning diverges. (I sincerely hope that this doesn't come across as overly-defensive.)
(Note: Unlike what the above link displays, the version of my answer as of deletion was the single sentence:
Here is a package called argunparse which seems to be suited for this purpose.
I subsequently edited my answer, adding some code because I intended to request undeletion. However, I was blocked from posting to the comment thread due to deletion, so I reposted my edited answer which has not been flagged.)
I am especially perplexed by the "From Review" comment:
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
But I believe my link was indeed only for reference, since I could have just as well posted:
There is a package called
argunparse
which seems to be suited for this purpose.
The "From Review" comment would make more sense to me upon replacing the word "link" with "package" but then the advice becomes nonsensical: I don't think it's appropriate to repost the source of a package in the answer section. I agree that my answer becomes invalid if the package is renamed or deleted, but that seems rather extreme.
Finally, I feel like the code which I added to my answer in an attempt to appease the reviewers adds nothing of value. I would feel good about the process if the deletion compelled me to improve my answer, but instead I'm left with the feeling of making something worse in order to evade a rule. My criticism of my new answer is:
- It doesn't address the general question, but rather OP's "for instance" question, which is already over 3 years old, and surely no longer of interest to OP.
- For the general purpose question, anyone would surely be better-served by examining the examples provided in the package's documentation. In this sense, I don't feel like there's anything useful I can add to my original answer.
Do others see some value in the added code which I don't? If not, should my new answer be deleted as well?
I suppose another possible route I could have taken would be to post my answer as a comment. But then it would not be so prominent since comments are often hidden. After all, if I answer the question, then shouldn't I just post it as an answer?
argparse
does not currently contain the functionality to operate in reverse and produce a command-line string from command-line arguments. One solution would be to read the arguments withargparse
and format them into a string, e.g.[one-line fstring code here]
. Alternatively, you could use a package such asunargparse
which is designed to implement this functionality in the general case."