Question: Is using magic methods in high level Python code is allowed by PEP8 ? For example, does PEP8 allows for:

```
ab = {'a', 'b'}
ab.__len__()

```

?

I often write code in editors when it's much easier to write left to right without going back to the beginning of a line.

Answer: 
Calling `__len__` directly doesn't violate PEP8, however, should be avoided as the inbuilt functions that use the magic methods do additional checks.

Example:

```
class Test:

    def __len__(self):
        return "hi"

print(Test().__len__()) # Prints hi
print(len(Test()))  # Prints "TypeError: 'str' object cannot be interpreted as an integer"

```
You can do this, but i don't recommended do some like this.
These are magic methods, they do not need to be called explicitly.

The best solution: len(obj), next(obj), etc.