muthesius/8bit-clocks — pull request #8 by schwarzben (2014-07-10 10:59:28+00:00)
Title: Bens clock

Refactored my implementation switching from class to instance variables where it made more sense to do so.

Use of class variables would imply multiple instances sharing the same values in these cases. Also this has never been actually used because each self.varname assignment created an instance variable instead of using
the class variable.

@jens-a-e Although pretty python-specific in its syntax, this might be interesting for all of us!

Basically, I went from

```python
class MyClass:
myVar = "test" # implied static/class variable, shared across *all* instances
def myFn(self):
# the following doesn't even change MyClass.myVar
# but creates a new instance variable
self.myVar = "blub"
```

to

```python
class MyClass:
def __init__(self):
self.myVar = "test" # instance variable
def myFn(self):
self.myVar = "blub" # this changes the instance variable which existed since __init__
```

for any instance-specific vars (e.g. `length`, `rotation`, `offset` and of course the variables holding the clock hands—otherwise multiple watches of the same class might collide).