learning-python (23 Part Series)
In this session, Cecil, Brian and chat learn about Object Oriented Programming in Python. Specifically they covered classes, instances, methods and more. Next episode they will be continuing where they left off and learn about Inheritence with classes and get into the topic of Exceptions.
The following are notes and details recapping a past live stream where we live code together. The idea behind these streams is that they provide real-world examples of running into problems and solving them or working towards solving them live. Enjoy this latest one on Python 🙂👍
✅ Warm up/Catch up with chat
✅ Learn how to interact with API's using Python
✅ Closing and raid @cldubya
- We completed part of the Object Oriented Programming section of the learnpython.dev course. Specifically we finished the Classes and Methods sections.
- We learned what classes are and how to use them
- We learned some methods that are part of classes and how to create our own
- Specifically: init(), str(), repr()
- We learned the difference between properties on the class vs. the instance of the class
- Continue the Object Oriented Programming section and cover the Inheritence section
- Our Code Repository
- Nina Zakharenko's course we're following: Learn Python
- Python Cheat Sheet
- Microsoft Developer's Python for Beginners
- via @adoezema: Will you cover decorators and closures?
- via @LattDior: Using named tuples for small programs in place classes
Clips are a feature on Twitch that let you cut and capture segments of the live stream in the moment (up to 60 seconds). See how to use clips on Twitch for more details. The following are some fun moments captured from this stream:
- Real world examples of classes that could be applied in programming
- Some naming conventions with classes in Python
- How to clone a git repository in VS Code
- Understanding classes and instances of classes
- You can add booleans in Python
- Initializing classes with properties in Python
Links not working on Twitch? It's most likely because Twitch will only save my stream recordings for about 60 days. Use the YouTube link at the top of this page instead.
This table helps point out different segments of the stream (highlighted in bold) or moments we learned something (not bold). The timestamps link to the video on Twitch at that point in the recording. If you'd like the YouTube link above will have similar timestamps and link to those same points in the recording as well.
|00:07:23||Kick it off|
|00:12:40||Recap from last episode|
|00:22:46||Real life example/explanation of classes|
|00:26:31||Begin learning about classes in Python|
|00:40:30||Begin trying classes in code|
|01:33:38||Back from break|
|01:38:22||Learning about class methods|
|01:53:38||Learning about init method in classes|
|02:18:43||Learning about str and repr methods in classes|
|02:24:12||Britney Spears impression (created by @bocajslive)|
|02:28:22||Recap of what we learned|
Thanks for reading this article. If you're interested in finding more content from Microsoft Cloud Advocates check out this monthly curated newsletter: Developer Community Newsletter