Closed mehulrastogi closed 12 months ago
Also just a side note: This kind of change will definitely break any pipelines that dependent on actually using the 'dirty' super
object
Some resource on the Python Multiple Inheritance
Basically according to this to not break anything while doing multiple inheritance we should :-
#!/usr/bin/env python2
class First(object):
def __init__(self):
print "First(): entering"
super(First, self).__init__()
print "First(): exiting"
class Second(object):
def __init__(self):
print "Second(): entering"
super(Second, self).__init__()
print "Second(): exiting"
class Third(First, Second):
def __init__(self):
print "Third(): entering"
super(Third, self).__init__()
print "Third(): exiting"
Third --> First --> Second --> object
Plan is to make all these changes to a new neurons class in the core Neurons.py
file and leave the contribs FoV neurons unchanged (but add a deprecation warning). Closing this for now, follow on issue #71
Solves #56
I did try to make this backward compatible but that might actually result in circular callbacks to the
__init__
functions. There might be a way around that but in general will involve adopting bad practices and will not be maintainable in the long run, which is what we are trying to achieve here.Current
Post the change
I tried to implement the factory method. This in my opinion is a small change in the API considering it rid of the
super
object in the FOV class. What do you think?