question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OLD Class Inheritance Concept Docs

See original GitHub issue

This issue describes how to implement the class-inheritance concept docs.

Getting started

Please 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. So, before diving into the implementation, please read up on the following documents:

Goal

This concept is meant to teach an understanding/use of class-inheritance in Python.

Learning objectives

  • more fully understand the uses (and possible abuses) of classes in Python
  • understanding and use of single inheritance in Python
  • understanding and use of multiple inheritance in Python
    • the diamond inheritance problem
    • Pythons MRO (method resolution order)
    • pros and cos of mixins () to isolate multiple inheritance issues
  • when and when not to use __super__() to call a parent class constructor

Out of scope

  • class-composition as an explicit topic (it is ok to use limited composition as needed in example code)
  • dataclasses
  • decorators outside of @property, @staticmethod, and @classmethod (the student should already be exposed to these in the prerequisite exercise)
  • generators
  • coroutines
  • descriptors (these will get their own exercise)
  • using a class as a decorator
  • performance considerations

Concepts

  • classes
  • inheritance in OOP
  • single inheritance
  • multiple inheritance
  • minxins
  • __super__()

Prerequisites

These are the concepts/concept exercises the student needs to complete/understand before solving the concept exercise that these concept documents support.

  • basics
  • booleans
  • classes
  • class-customization
  • comparisons
  • decorators
  • dicts
  • functions
  • higher-order-functions
  • iteration
  • lists
  • numbers
  • sequences
  • sets
  • strings
  • tuples

Resources to refer to

  • links.json

    For more information, see concept links file

    • The same resources listed in this issue can be used as a starting point for the concepts/links.json file, if it doesn’t already exist.
    • If there are particularly good/interesting information sources for this concept that extend or supplement the concept exercise material & the resources already listed – please add them to the links.json document.

Concept Description

Please see the following for more details on these files: concepts

  • Concept about.md

    For more information, see Concept about.md

    • This file provides information about this concept for a student who has completed the corresponding concept exercise. It is intended as a reference for continued learning.
  • Concept introduction.md

    For more information, see Concept introduction.md

    • This can also be a summary/paraphrase of the document listed above, and will provide a brief introduction of the concept for a student who has not yet completed the concept exercise. It should contain a good summation of the concept, but not go into lots of detail.

Implementation Notes

  • Example code should only use syntax & concepts introduced within these docs or one of the prerequisite concept exercises or documents. Please do not use comprehensions, generator expressions, or other syntax not previously covered. 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.

Help

If you have any questions while implementing the exercise, please post the questions as comments in this issue, or contact one of the maintainers on our Slack channel.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
BethanyGcommented, Mar 13, 2022

Once you commented, I could assign. So now you are assigned. 😉

0reactions
BethanyGcommented, Jun 11, 2022

Closing, as the PR for this has been optimistically merged. Further changes and improvements will be tracked under an improvement issue. Many thanks for your work on this, @girijakar!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inheritance - Learning the Java Language
A subclass inherits all the members (fields, methods, and nested classes) from its superclass. Constructors are not members, so they are not inherited...
Read more >
Inheritance | Microsoft Learn
Inheritance in C# enables you to create new classes that reuse, extend, and modify the behavior defined in other classes.
Read more >
setOldClass: Register Old-Style (S3) Classes and Inheritance
The list . OldClassesList contains the old-style classes that are defined by the methods package. Each element of the list is a character...
Read more >
Understanding Class Inheritance in Python 3 | DigitalOcean
This tutorial will go through some of the major aspects of inheritance in Python, including how parent classes and child classes work, ...
Read more >
Cascade, specificity, and inheritance - Learn web development
Also significant here is the concept of inheritance, ... A class selector is more specific; it will select only the elements on a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found