1

In this article I read:

When I was a kid, our neighbors had two twin cats.

Both cats looked seemingly identical—same charcoal fur, same piercing green eyes. Some personality quirks aside, you just couldn’t tell them apart just from looking at them. But of course they were two different cats, two separate beings, even though they looked exactly the same.

There’s a difference in meaning between equal and identical. And this difference is important when you want to understand how Python’s is and == comparison operators behave.

The == operator compares by checking for equality: If these cats were Python objects and we’d compare them with the == operator, we’d get “both cats are equal” as an answer.

The is operator, however, compares identities: If we compared our cats with the is operator, we’d get “these are two different cats” as an answer.

But before I get all tangled up in this ball of twine of a cat analogy, let’s take a look at some real Python code.

In the previous context, author takes cat twins for an instance, then follows

with ball-of-twine

I roughly understand the brief meaning.

In Wikipedia, it has no relation with twins.

The phrase has no explanation in urban dict.

I assume the author applied wrong phrase when flaunting his vocabulary.

Is it a popular phrase?

3

The author talks about twin cats and code that looks but is not the same.

A ball of twine is as you saw in Wikipedia a lot of string rolled together.

Cats like to play with it and they can end up "tangled up" like this:

enter image description here

He means that he wants to show a few things before getting all rolled up in the analogy of twin cats. It is the cats+twine he is referring to and the "twin/twine" can be just a coincidence or for reasons of punning

  • very very surprise.lol – Algebra Dec 8 '17 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.