Aug-27-2020, 08:58 PM
Hello all
Just a quick regarding classes and objects.
I have created a python file called Arm, which contains a class as shown below:-
In the same directory i have created a new python called test and imported the class using the following code:-
The issue is that when i enter the line of code london = Arm.HelloClass( i would normally get a dialogue box to show me all of the parameters i.e. london = Arm.HelloClass(A= "",B = "", C = "", D = "") but this does not show up in the test file - does anyone know why?
Also when i create an object and try to set one of the attributes python does not auto fill the rest of the attribute i was wondering if anyone knew why?
The doc string doesnt even show up in the test file??
I have attached a screen shot showing the object being created within the Arm file and as you can see the available parameters for the class is shown, but this information is not shown when i try and create the object in the test file why is that????
Thank you.
Just a quick regarding classes and objects.
I have created a python file called Arm, which contains a class as shown below:-
1 2 3 4 5 6 7 8 9 10 11 12 13 |
class HelloClass: """ This is the doc string """ def __init__( self , A = " ",B = " ", C = " ", D = " "): self .A = A self .B = B self .C = C self .D = D print ( "Object Created" ) |
1 2 3 4 5 |
import Arm london = Arm.HelloClass() london.A = 23 |
Also when i create an object and try to set one of the attributes python does not auto fill the rest of the attribute i was wondering if anyone knew why?
The doc string doesnt even show up in the test file??
I have attached a screen shot showing the object being created within the Arm file and as you can see the available parameters for the class is shown, but this information is not shown when i try and create the object in the test file why is that????
Thank you.