0

How do you define a field (class variable) in python without assigning it to something?

So, I need to define a Thread variable in my code, assign it after __name__ == '__main__': and then use it in other functions in the code?

29th May 2018, 7:25 PM
Robert Sokolov
Robert Sokolov - avatar
3 odpowiedzi
+ 1
assign it None e.g this.threadVar = None
29th May 2018, 7:47 PM
TurtleShell
TurtleShell - avatar
+ 1
Oh, I made a mistake and typed 'null' and it wouldn't compile, logically 😂
30th May 2018, 9:43 AM
Robert Sokolov
Robert Sokolov - avatar
0
Haha I make that mistake sometimes too
30th May 2018, 2:30 PM
TurtleShell
TurtleShell - avatar