You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
You can call it only from inside the methodazro– azro2020年04月02日 08:20:46 +00:00Commented Apr 2, 2020 at 8:20
-
1The class is redefined every time you call the function. You can't easily access the class from outside the function.L3viathan– L3viathan2020年04月02日 08:21:53 +00:00Commented Apr 2, 2020 at 8:21
-
You can’t "call" a class. in the code you’ve shown you’re defining a class, and when you create objects from it you are instantiating it.Konrad Rudolph– Konrad Rudolph2020年04月02日 08:22:11 +00:00Commented Apr 2, 2020 at 8:22
-
The same way you use any object created inside a function, you return it from the function and it is up to the caller to use the object.juanpa.arrivillaga– juanpa.arrivillaga2020年04月02日 08:22:52 +00:00Commented Apr 2, 2020 at 8:22
lang-py