Skip to content

Commit abb00fb

Browse files
committed
fixed vercel fail, updated docker package version
1 parent fb515bb commit abb00fb

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

docs/python/python_oops.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
#author: seema kumari patel
2-
#OOPs concept - Python
3-
41
---
52
id: python-OOPs
63
title: Python OOPs concept
74
sidebar_label: Python OOPs concept #displays in sidebar
85
sidebar_position: 19
6+
author: Seema Kumari Patel
7+
description: OOPs concept in Python
98
tags:
109
[
1110
Python,
1211
Introduction of python,
1312
Python Syntax,
1413
Python Variables,
15-
Python Operators,
16-
14+
Python Operators,
1715
]
18-
1916
---
2017

2118

@@ -31,26 +28,31 @@ Python supports the core principles of object-oriented programming, which are th
3128

3229
📌 **Use Case**: create a class - car
3330

31+
```python
3432
class Car:
3533
def __init__(self, brand, model):
3634
self.brand = brand
3735
self.model = model
3836

3937
def start(self):
4038
print(f"{self.brand} {self.model} is starting...")
39+
```
4140

4241
2. Object - An instance of a class.
4342

4443
📌 **Use Case**: instantiate the variables
4544

45+
```python
4646
my_car = Car("Tesla", "Model S")
4747
my_car.start() # Tesla Model S is starting...
48+
```
4849

4950

5051
3. Encapsulation - Hiding the internal details and only exposing necessary parts.
5152

5253
📌 **Use Case**: Not letting data to be accessed by other class
5354

55+
```python
5456
class BankAccount:
5557
def __init__(self, balance):
5658
self.__balance = balance # private variable
@@ -60,12 +62,14 @@ class BankAccount:
6062

6163
def get_balance(self):
6264
return self.__balance
65+
```
6366

6467

6568
4. Inheritance - One class can inherit from another.
6669

6770
📌 **Use Case**: car (parent) class is getting inherited by (child) ElectricCar
6871

72+
```python
6973
class ElectricCar(Car):
7074
def __init__(self, brand, model, battery):
7175
super().__init__(brand, model)
@@ -77,12 +81,14 @@ class ElectricCar(Car):
7781
tesla = ElectricCar("Tesla", "Model X", 100)
7882
tesla.start()
7983
tesla.battery_info()
84+
```
8085

8186

8287
5. Polymorphism - Same function name, but different behavior depending on the object.
8388

8489
📌 **Use Case**: Different classes using single method for different purposes.
8590

91+
```python
8692
class Dog:
8793
def speak(self):
8894
return "Woof!"
@@ -94,12 +100,14 @@ class Cat:
94100
pets = [Dog(), Cat()]
95101
for pet in pets:
96102
print(pet.speak()) # Woof! / Meow!
103+
```
97104

98105

99106
6. Abstraction - Hiding implementation details, showing only essential features (using abc module).
100107

101108
📌 **Use Case**: Hiding low level details
102109

110+
```python
103111
from abc import ABC, abstractmethod
104112

105113
class Shape(ABC):
@@ -116,5 +124,6 @@ class Circle(Shape):
116124

117125
c = Circle(5)
118126
print(c.area()) # 78.5
127+
```
119128

120129

docusaurus.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,12 @@ const config: Config = {
242242

243243
markdown: {
244244
mermaid: true,
245+
hooks: {
246+
onBrokenMarkdownLinks: "warn",
247+
},
245248
},
246249

247-
// Keep legacy setting until fully migrated to v4
248-
onBrokenMarkdownLinks: "warn",
250+
// Migrated legacy setting to markdown.hooks.onBrokenMarkdownLinks
249251

250252
themes: ["@docusaurus/theme-mermaid"],
251253

0 commit comments

Comments
 (0)