matplotlib/matplotlib-py3 — Issue #33: __bool__ should return bool, returned int
Author: rrrsadowski
Created: 2011-11-25 21:26:28+00:00
State: open

when running:

```python
import matplotlib.pyplot as plt
plt.plot([1, 2 ,3, 4])
plt.show()
```
on a fresh-installed matplotlib on Ubuntu 11.04, I get "TypeError: \_\_bool\_\_ should return bool, returned int"

changing

```python
def __bool__(self):
return len(self._path.vertices)
```
in markers.py in the matplotlib folder to

```python
def __bool__(self):
return bool(len(self._path.vertices))
```

solves the problem, but I have no idea how does it affect other functions of matplotlib since I cannot run tests.

Can anyone confirm the problem?