Question: Are there any guidelines on when to stop chaining methods and instead break up the chain into several expressions?

Consider e.g. this Python code, which build up a dictionary, with word as key and the corresponding count as the value:

```
def build_dict(filename):
    with open(filename, 'r') as f:
        dict = defaultdict(int)

        for word in f.read().lower().split(): # too much?
            dict[word] += 1

        return dict

```

Is chaining 3 methods okay? Would I gain any noticable benefit by split the expression up?

Answer: 
What would be the point of chaining only two? *If* you do method chaining, do it right.

It's more an issue of formatting, if it gets to much for a single line, I prefer

```
(x.Foo()
  .Bar()
  .FooBar()
  .Barf());

```

Another issue can be debuggers, that force you to trace into `Foo` if you want to trace into `Bar`.
One reason not to use long chains is that it obscures traceback error messages.
When an exception is raised anywhere in the long chain, the traceback error message only tells you the line on which the Exception occurred, not which part of the chain.

If you are confident that no exception will occur, then 

```
for word in f.read().lower().split():
    dict[word] += 1

```

might be preferable to

```
contents=f.read()
contents=contents.lower()
words=contents.split()
for word in words:
    d[word] += 1

```

because memory is consumed by the string `contents` and the list `words` and is not released until this block of code ends (assuming no other references are made to the same objects). So if memory is tight, you might want to consider chaining.

If memory is not a problem, and particularly if `words` or `contents` could be used again later in the code, then assigning a variable to reference them will of course be faster since the `read`, `lower` and/or `split` methods won't have to be called again.