Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CodeWithHarry/The-Ultimate-Python-Course
/ Number
Class
Number
Chapter 11/07_operator_overloading.py:1–6 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
class
Number:
2
def
__init__(self, n):
3
self.n = n
4
5
def
__add__(self, num):
6
return
self.n + num.n
7
8
n = Number(1)
9
m = Number(2)
Callers
1
07_operator_overloading.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected