Which is the right way to work with variables inside a class?

1- setting them as class attributes where we get them and access them from class itself:

```
class NeuralNetwork(object):

  def __init__(self, topology):
    self.topology = topology
    self.buildLayers()

  def buildLayers(self):
    for layer in self.topology:
      #do thing

```

2- passing them through methods that we need them without assign at class if they are not really useful variables:

```
class NeuralNetwork(object):

  def __init__(self, topology):
    self.buildLayers(topology)

  def buildLayers(self, topology):
    for layer in topology:
      #do thing

```

3- a mix of the above two:

```
class NeuralNetwork(object):

  def __init__(self, topology):
    self.topology = topology
    self.buildLayers(self.topology) # or self.buildLayers(topology) ?

  def buildLayers(self, topology):
    for layer in topology:
      #do thing

```

I think that the first one is the correct, but it don't let you to reuse the function for different purposes without assigning a new value to the variable, what would look like these:

```
self.topology = x
self.buildLayers()

```

What looks weird and you don't really understand that changing `self.topology` is affecting the call of `self.buildLayers()`