I've been reading a Python textbook, and I see the following code:
class Database:
# the database implementation
pass
database = None
def initialize_database():
global database
database = Database()
Now, why is there a global
declaration inside initialize_database
function? We had defined database
outside the function, doesn't it make it global already?
Best Regards,