3

I just stumbled with this question, where the author has a problem with the zip() function in python 3, but posts as a neural networks problem.

The question was edited with the following:

/////////////////////////////////////////////////////////////////////

A solution for this example was posted by @Nicolas Turgeon and can be found here:

Python 2 --> 3: object of type 'zip' has no len()

The underlying problem is the same, but the author didn't see it.

Are these questions duplicates?


Should I interpret from this answer that the the questions themselves are not duplicate?

2 Answers 2

4

It's actually the same problem: both authors are converting code written for Python 2 to Python 3 and running into the same error:

TypeError: object of type 'zip' has no len()

Now, to answer your general question... It depends. Generally-speaking, you should be a bit reluctant to mark questions as duplicates when they concern problems in markedly different contexts, to avoid leaving future readers searching for answers to a problem in one context confused by the apparent switch to what would seem a completely different scenario. However, if the immediate context is the same, such that the problems can be understood as identical by both readers and answerers, it is helpful to mark them as duplicates so that future readers searching for solutions to the problem can find the solution, regardless of which context they're arriving from. See also: Dr. Strangedupe: Or, How I Learned to Stop Worrying And Love Duplication

Finally, I should note that in your example the questions have identical context: both authors are attempting to convert code from the exact same tutorial from Python 2 to Python 3. I've marked it as a duplicate.

3

If the difference in context is relevant to how the problem is solved, then they aren't duplicates, as they have different solutions. If the difference in context is irrelevant to the how to solve the question, which sounds like it's the case here, then they are duplicates.

2
  • The context is different, but the solution is exactly the same, and was already posted as answer. Was previously posted as a comment too, and it seems that the author had (exactly) the same problem twice...
    – Luis
    Jun 27, 2016 at 20:35
  • 2
    @Luis - The context on both questions is the same. Look at the links in both of those questions. Both questions are about the same tutorial, and have the same error. The new question should be closed as a duplicate of the old question.
    – theB
    Jun 27, 2016 at 20:39

You must log in to answer this question.

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