Skip to main content

All Questions

2 questions with no upvoted or accepted answers
0 votes
1 answer
3k views

Instantiate a class from a config file. Where should the parse function go?

I have a class in python that is instantiated from the values of a (json) config file. I was wondering what is the best practise to do that (if there is a best practise and is not just a matter of ...
Cobra Kai Dojo's user avatar
-1 votes
2 answers
801 views

How to decide if a global variable is used inside or outside a function in Python?

In Python variables that are created outside of a function are known as global variables. However to create a global variable inside a function (a local variable), you can use the global keyword. My ...
Qubit's user avatar
  • 197