TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Good way to learn encapsulation with Python?

3 pointsby codetricityover 7 years ago
I'm teaching a 12 year old girl Python and want a tutorial to show best practices for separation of concerns, encapsulation , use of functions and classes. Most articles I've seen deal with theoretical recommendations. I want a step-by-step tutorial that is almost all code snippets and not very much text other than the code snippets. I'm looking for things like, put libraries in /lib, when to use from libname import function, when to create a class verses function. As this is for a 12 year old girl, I don't want a long essay on object oriented design, just a set of examples on what's a good way to do things. any help finding these types of tutorials for Python would be great. She's using Pygame

1 comment

stephen82over 7 years ago
I searched for &quot;python encapsulation&quot; and got this if you are interested: <a href="https:&#x2F;&#x2F;pythonspot.com&#x2F;en&#x2F;encapsulation&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pythonspot.com&#x2F;en&#x2F;encapsulation&#x2F;</a>
评论 #15458750 未加载