Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLD class-inheritance concept exercise #2351

Closed
BethanyG opened this issue Feb 15, 2021 · 4 comments
Closed

OLD class-inheritance concept exercise #2351

BethanyG opened this issue Feb 15, 2021 · 4 comments

Comments

@BethanyG
Copy link
Member

BethanyG commented Feb 15, 2021

This issue describes how to implement the class-inheritance concept exercise for the python track.

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 exercise 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 this concept exercise.

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

Resources to refer to

  • Hints

    For more information on writing hints see hints

    • You can refer to one or more of the resources linked above, or analogous resources from a trusted source. We prefer using links within the Python Docs as the primary go-to, but other resources listed above are also good. Please try to avoid paid or subscription-based links if possible.

Concept Description

Concept file/issue: #2972

  • Exercise introduction.md

    For more information, see Exercise introduction.md

    • This should closely relate to or summarize/paraphrase the concept introduction document, but add enough additional information and examples for the student to complete the tasks outlined in this concept exercise.

Test-runner

No changes required to the Python Test Runner at this time.

Representer

No changes required to the Python Representer at this time.

Analyzer

No changes required to the Python Analyzer at this time.

Exercise Metadata - Track

For more information on concept exercises and formatting for the Python track config.json , please see concept exercise metadata. The track config.json file can be found in the root of the Python repo.

You can use the below for the exercise UUID. You can also generate a new one via exercism configlet, uuidgenerator.net, or any other favorite method. The UUID must be a valid V4 UUID.

  • Exercise UUID : df9adab4-d428-4774-bfd1-54fefe8c9ae7
  • concepts should be filled in from the Concepts section in this issue
  • prerequisites should be filled in from the Prerequisites section in this issue

Exercise Metadata Files Under .meta/config.json

For more information on exercise .meta/ files and formatting, see concept exercise metadata files

  • .meta/config.json - see this link for the fields and formatting of this file.
  • .meta/design.md - see this link for the formatting of this file. Please use the Goal, Learning Objectives,Concepts, Prerequisites and , Out of Scope sections from this issue.

Implementation Notes

  • Code in the .meta/examplar.py file should only use syntax & concepts introduced in this exercise or one of its prerequisite exercises.
    Please do not use comprehensions, generator expressions, or other syntax not previously covered. Please also follow PEP8 guidelines.
  • In General, tests should be written using unittest.TestCase and the test file should be named <EXERCISE-NAME>_test.py.
  • While we do use PyTest as our test runner and for some implementation tests, please check with a maintainer before using a PyTest test method, fixture, or feature.
  • 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.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2021

This issue has been automatically marked as abandoned 🏚 because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@BethanyG BethanyG added this to the New V3 Concept Exercises milestone Mar 31, 2021
@BethanyG BethanyG removed this from the New V3 Concept Exercises milestone May 21, 2021
@BethanyG BethanyG added x:action/create Work on something from scratch x:knowledge/intermediate Quite a bit of Exercism knowledge required x:module/concept-exercise Work on Concept Exercises x:size/large Large amount of work help wanted We'd like your help with this. new exercise ✨ x:knowledge/advanced Comprehensive Exercism knowledge required and removed x:knowledge/intermediate Quite a bit of Exercism knowledge required labels Jun 15, 2021
@BethanyG BethanyG changed the title [V3] Implement New Concept Exercise: class-inheritance [New Concept Exercise] : class-inheritance Jun 16, 2021
@BethanyG BethanyG added x:knowledge/intermediate Quite a bit of Exercism knowledge required and removed x:knowledge/advanced Comprehensive Exercism knowledge required labels Jun 16, 2021
@github-actions

This comment was marked as outdated.

@BethanyG BethanyG added x:knowledge/advanced Comprehensive Exercism knowledge required and removed x:knowledge/intermediate Quite a bit of Exercism knowledge required labels Aug 12, 2021
@BethanyG BethanyG added claimed 🐾 For new exercises being written by contributors and maintainers. x:status/claimed Someone is working on this issue and removed help wanted We'd like your help with this. labels Mar 1, 2022
@BethanyG
Copy link
Member Author

BethanyG commented Mar 1, 2022

Currently being worked on in issue #2960.

@BethanyG BethanyG added x:size/medium Medium amount of work x:size/large Large amount of work help wanted We'd like your help with this. and removed x:status/claimed Someone is working on this issue x:size/large Large amount of work claimed 🐾 For new exercises being written by contributors and maintainers. x:size/medium Medium amount of work labels Mar 9, 2022
@BethanyG BethanyG removed x:action/create Work on something from scratch x:knowledge/advanced Comprehensive Exercism knowledge required x:module/concept-exercise Work on Concept Exercises x:size/large Large amount of work help wanted We'd like your help with this. new exercise ✨ labels Jun 11, 2022
@BethanyG BethanyG changed the title [New Concept Exercise] : class-inheritance OLD class-inheritance concept exercise Jun 11, 2022
@BethanyG
Copy link
Member Author

Closing for re-write.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants