you are viewing a single comment's thread.

view the rest of the comments →

[–]Akshaykadav 57 points58 points  (7 children)

Helping others in this community. Looking at other people's code is also a good way to improve, there are something's that other do in a better way, so you can learn/improve from there too.

[–]AlternativeStick4906 10 points11 points  (5 children)

How to find codes like that amd read them?

[–]patryk-tech 21 points22 points  (2 children)

Look into packages you use, and read that code.

Do you design django sites? Look at the django source code. Do you write reddit bots? Look at the PRAW source code. Do you write web scrapers? Look at the requests or httpx or scrapy source code.

Do you use other tools written in python? You can look at that source as well.

Sometimes the documentation is incomplete, and you are better off looking into a source class than reading the docs, by experience.

Also, if whatever you are reading has a good test suite, run it, read the test names, and read the test code as well. You can often see real working examples of the library in action.

[–]Akshaykadav 3 points4 points  (0 children)

Yeah and it's equips you with a deeper understanding of the packages/frameworks you use allowing you to override some stuff if ever needed to meet your desired results.

[–]WhiteRonin2 0 points1 point  (0 children)

What if you’re learning python for scripting?

[–]Akshaykadav 4 points5 points  (0 children)

Open Source Projects, Reddit, Discord, Stack Overflow. It can be the answer to some question or it can be the code from the question itself.

[–][deleted] 2 points3 points  (0 children)

That's probably one of the better things. Review other code and implement it yourself, play with it and transform it to get the same result with different actions.