We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04972c3 commit 2e7d0f2Copy full SHA for 2e7d0f2
python-double-underscore/csv_data.py
@@ -1,5 +1,3 @@
1
-# csv_data.py
2
-
3
import csv
4
5
python-double-underscore/mangling.py
@@ -0,0 +1,15 @@
+class A:
+ def __init__(self):
+ self.__attr = 0
+
+ def __method(self):
6
+ print("A.__attr = ", self.__attr)
7
8
9
+class B(A):
10
11
+ super().__init__()
12
+ self.__attr = 1 # Doesn't override A.__attr
13
14
+ def __method(self): # Doesn't override A.__method()
15
+ print("B.__attr = ", self.__attr)
0 commit comments