Sonkun/python-sfml2 — pull request #14 by aspidites (2012-06-23 09:40:37+00:00)
Title: Operator fixes

- made it so that __all__ operators can be passed a number like object (was just multiplication and division before)
- made operations act on __any__ sequence like object, rather than simply vectors or other types with x and y values:
```python
v = sf.Vector2(2, 3)
v2 + v1 + (2, 3)
v2 *= 2, 3, 4
````
- division now works properly in python 2. Before, even after issuing `from __future__ import division`, floor division was conducted. This is no longer the case
- removed from_tuple. Use sequence unpacking instead:
```python
tup = (1, 2, 3)
vec = sf.Vector3(*tup)
```
- operators now work on all numeric types (before, it would fail with `long` and `complex` types.
- returned values directly instead of assigning intermediate values; i suspect this has positive performance implications, but I haven't tested at all; it was more of a matter of style