0

I'm following Miguel Grinberg's Flask Megatutorial. He defines the configuration class of the app as:

class Config(object):
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'

What is te meaning of object? why is it passed to the classs? to my understanding, passing an argument when defining a class means inheritance so, why is Config inheriting form object and in what other cases should I do the same?

Chegon
  • 140
  • 1
  • 8
  • 1
    That means you're looking at an old tutorial. Dump it and find one that's more up to date. There are _very_ few valid reasons to be working with Python 2 in 2019, and you definitely shouldn't be learning it as a new language. – ChrisGPT was on strike Aug 29 '19 at 02:47
  • I like python3.6+, especially python3.8 so much~ – Waket Zheng Aug 29 '19 at 08:57

0 Answers0