1
I’m doing an implementation of the Star algorithm(A*).
My doubt is just that of the title, I come from java and c++, and I do not know how to do this in python.
def transfTo(Bucket a): <------------Dúvida aqui!
        transf = a.total - a.current
        if current >= transf:
            a.current = a.total
            current -= transf
        else:
            a.total += current
            current = 0
The question is whether you can pass as parameter or whether it is possible to define the instance class? Remember that, unlike Java and C++, Python has dynamic typing.
– Woss
If I can pass as parameter. Because I am not able to access the methods and attributes of the variable "a" of the Bucket class.
– Rafael Oliveira