You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-3
Original file line number
Diff line number
Diff line change
@@ -730,8 +730,20 @@
730
730
class Employee:
731
731
@property
732
732
def name(self):
733
-
return self.name
733
+
return self.Name
734
734
data=Employee()
735
-
name="varinder"
735
+
Name="varinder"
736
736
print(data.name)
737
-
```
737
+
```
738
+
739
+
# @getter or setter
740
+
- Above mention "@property_decotrstor" is called getter who get the value and with help of setter method or decorator you can define a [email protected] like that.
741
+
*Example is connected with above one*
742
+
```
743
+
@name.setter
744
+
def name(self,value):
745
+
self.name=value
746
+
```
747
+
748
+
# Operator overloading in Python
749
+
- Operators can be overloaded by using dunder methods in python.
0 commit comments