-
Notifications
You must be signed in to change notification settings - Fork 109
Labels
enhancementNew feature or requestNew feature or requesthacktoberfest-acceptedlevel 110 points10 pointsrecodethis is label for leaderboardthis is label for leaderboard
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Issue Description
A new documentation chapter titled "Constructor in Python" should be added under the Python Object-Oriented Programming (OOP) section. The chapter should explain:
- What is a constructor in Python
- Purpose of the
__init__()
method - Default vs parameterized constructors
- Constructor behavior during object creation
- Use of
self
in constructors - Code examples to demonstrate constructor usage
Suggested Change
Why is this important?
- The current Python OOP section covers important topics like classes, inheritance, and polymorphism, but constructors are missing.
- Constructors are essential for object initialization and are a core concept in Python OOP.
- Including this topic will make the documentation more comprehensive and helpful for Python learners.
Rationale
What needs to be done?
- Create a new markdown or documentation file, e.g.,
constructor-in-python.md
, inside the Python OOP folder. - Add a link to this chapter in the sidebar under the Python > OOP section.
- Follow the same format and structure used in other OOP chapters (e.g., Classes and Objects).
- Add at least 2β3 example code snippets explaining constructor behavior.
Urgency
High
Record
- I have read the Contributing Guidelines
- Are you a GSSOC'25 contributor
- I want to work on this issue
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthacktoberfest-acceptedlevel 110 points10 pointsrecodethis is label for leaderboardthis is label for leaderboard
Type
Projects
Status
Done