-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
This issue describes how to implement the descriptors concept docs.
You can find the related concept exercise issue here
If you have not yet contributed to concept documents, this issue will require some upfront reading to give you the needed background knowledge.
✅ Getting started
Please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time.
General Contributing Docs:
- Contributing to Exercism | Exercism and GitHub | - Contributor Pull Request Guide
- What are those Weird Task Tags about?
- Exercism Formatting and Style Guide
- Exercism Markdown Specification
- Reputation
Documents on Language Tracks and Concepts:
🎯 Goal
These concept docs are meant to teach an understanding/use/creation of descriptors in Python.
💡 Learning objectives
- more fully understand the uses (and possible abuses) of
classesin Python - more fully understand the options available for
class customizationin Python throughdescriptors- what the
descriptor protocol** is** - what the
descriptor protocoldoes for class & object members, properties, and attributes - how
descriptorsare used to simplify APIs for end-users in frameworks and libraries - how
descriptorsrelate to@classmethod@staticmethodand@property(they'redecoratorsthat makedescriptors) - how
descriptorsrelate toprivate variables,name manglingand attribute access data descriptorsnon-data descriptors
- what the
🚫 Out of scope
Concepts & Subjects that are Out of Scope
comprehensionsgeneratorscoroutines- using a
classas a decorator type annotations
🤔 Concepts
Concepts and Related Concepts this Concept Covers
classesclass attributesclass membersdescriptors
↩️ Prerequisites
These are the concepts/concept exercises the student should be familiar with before taking on/learning this concept.
Prereqs
basicsbooleansclassesclass-customizationclass-compositionclass-inheritancecomparisonsdecoratorsdictsiterationlistsnumberssequencessetsstringstuples
📚 Resources to refer to
Resources
- Python Docs: Descriptor HowTo Guide
- Real Python: Python Descriptors: An Introduction
- Deepsource: Demystifying Python's Descriptor Protocol
- The Mouse vs Python: What are descriptors?
- IBM Developer: Introduction to Python Descriptors
- classes (Python tutorial)
- Real Python: Object-Oriented Programming in Python 3
📁 Files to Be Created
File Detail for these Concept Documents
|
Please see the following for more details on these files: concepts
|
🎶 Implementation Notes
- Example code should only use syntax & concepts introduced within these docs or one of the prerequisite concept exercises or documents. Where possible, please use REPL formatting, unless you are demonstrating pseudo code or a long code block.
Please do not use syntax not previously covered in prerequisite topics or exercises. Please also follow PEP8 guidelines. - Our markdown and JSON files are checked against prettier . We recommend setting prettier up locally and running it prior to submitting your PR to avoid any CI errors.
🆘 Next Steps & Getting Help
If you'd like to work on this issue, comment saying "I'd like to work on this"(there is no real need to wait for a response, just go ahead, we'll assign you and put a[claimed]label on the issue).- If you have any questions while implementing, please post the questions as comments in here, or contact one of the maintainers on our Slack channel.