microblog
microblog copied to clipboard
super(Class, self) -> super()
https://github.com/miguelgrinberg/microblog/blob/8f43aadd412cd141effccedf1cfe2bff4e0d1f0d/app/forms.py#L41
Hi Miguel, many many thanks for creating this absolute masterpiece of tutorial! I cannot tell you how much I appreciate all the work and time put into it. You are the real MVP!
I'm trying to give back to you and show my appreciation by writing this. I noticed a very minor enhancement that could be done here. If I'm not mistaken super() shouldn't be called with any arguments in Python 3 anymore. So I think this line should be:
super().__init__(*args, **kwargs)
Please feel absolutely free to ignore me on this one or tell me to ignore minor enhancements like this. I love your Mega-Tutorial and all the other great stuff you are doing for the Flask and Python Communities!
You are correct, this is a left over from back in the day when this tutorial had to work on both Python 2 and 3.
Is this open for contribution as python2 is a thing a past now. I would be happy to make a PR.
Unfortunately I cannot merge PRs in this repository as that creates a problem with the carefully constructed commit history.
Unfortunately I cannot merge PRs in this repository as that creates a problem with the carefully constructed commit history.
😥
Closing as this does not apply to the new edition of this tutorial.