However, I would like to clarify whether it is all questions of the type "what's the best practice for doing X" that are considered opinion-based, or if it was just the framing of that specific question that was not specific enough.
They are all opinion-based. This is pretty clearly laid out in the help centre.
I am confused, because another of my questions of the same type got a few good answers earlier, and didn't get closed (most pythonic way to provide two different ways to instantiate?).
Almost all content moderation on the site is done by volunteers - anyone who has accumulated enough reputation for the relevant privileges. Most reputation comes from answering questions, which is relatively easy for experienced programmers - especially if they don't care about the site's standards for questions. Thus, there is no guarantee that the people who evaluate a question, actually have any understanding of the site's standards.
In general, "curators" (people with editing and closing privileges who actively use them) are counseled to edit questions to fix them where there's a clear fix that doesn't require information from the OP, and vote to close questions where that doesn't apply.
Regarding your previous question, it has since been edited to fix the issue of subjectivity. Answering that question doesn't really require comparing techniques, quoting best practices, etc. The requirement can be stated reasonably objectively: you want a technique that allows the user to avoid ambiguity between the a
and b
values, and there aren't a lot of options (if the ambiguity isn't resolved by the name of the parameter, it will have to be resolved by the name of the function that creates the object - i.e., by using a classmethod
factory instead of __init__
).
Regarding your current question, "passing parameters between modules" isn't really a proper description in the first place (presumably you are passing them to a class or function that is defined in a different module?) and the task is definitely not well specified (in the abstract, it seems like you are looking for ways to "bundle" parameters together, and there are any number of ways to perform the bundling - and for any given set of parameters, one could debate which parameters should be bundled together, whether to bundle the bundles, etc.) It also isn't clear why it should be relevant that the code being called is in a different module: code within the same module could just as easily involve functions with a large number of parameters that call each other. In short, it isn't feasible to advise in general, and what little advice can be offered is highly subjective.
I would find it a pity if all questions of that type are banned, because as a self-taught guy, most of my problems are within that realm.
Stack Overflow is not a discussion forum or any kind of tutorial resource; we want Q&A to show things that someone else can look up to get a quick, direct, objective answer. We don't want open-ended philosophical discussions, because the next person who comes along is going to be in a slightly different situation, say, with a totally different complex set of parameters for which a different bundling makes sense, and the general principles will be hard to extract. Questions like this also don't usually make a good search target (what would you put in a search engine?).