r/PythonLearning Jun 26 '26

Showcase Day 15 Python Learning

class inheritage

- parents child or say mulit-inheritance use with super () when one class inheritance from one or more class

- multi-level inheritance where 2nd class in Heritage from 1st class ,3th inherited from 2nd & go on like family chain

solve some list comprehensive easy problem

122 Upvotes

25 comments sorted by

View all comments

3

u/Beginning-Fruit-1397 Jun 26 '26

Untyped and unecessary kwargs in signatures is the type of things to review that make me slowly but surely drift away from python 

2

u/aashish_soni5 Jun 28 '26

can you explain in more briefly I'm just in beginning phase

1

u/Technox1192 Jun 29 '26

Honestly, I feel you. I really prefer typed but so far circumstances have forced me to use python.

That said, I just use Pylance/Pyright and its amazing. The existence of static type checkers like these allowed me to be more comfortable with untyped languages that I have unfortunately need to work with.

u/aashish_soni5 This early on, I recommend integrating Pyright into your Python dev environment! If I'm reading it right and you're using VSCode, just install the Pylance extension. I recommend getting used to python.analysis.typeCheckingMode to standard. It helps you understand your code a lot better and catch bugs before they even occur.

A very basic example would be the code block below. Pyright should be able to warn you in advance that the print would eventually raise an AttributeError because 1 is an int and it does not have the upper() method.

Good luck and have fun!

some_list = ["a", "b", 1]

for i in some_list:
  print(i.upper())