mirror of
https://github.com/satwikkansal/wtfpython.git
synced 2025-08-06 05:07:26 +02:00
Minor corrections in previous example
This commit is contained in:
5
README.md
vendored
5
README.md
vendored
@@ -1710,7 +1710,6 @@ Suggested by @Lucas-C in [this](https://github.com/satwikkansal/wtfpython/issues
|
|||||||
|
|
||||||
|
|
||||||
```py
|
```py
|
||||||
# Name mangling:
|
|
||||||
class Yo(object):
|
class Yo(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__honey = True
|
self.__honey = True
|
||||||
@@ -1719,9 +1718,9 @@ class Yo(object):
|
|||||||
|
|
||||||
**Output:**
|
**Output:**
|
||||||
```py
|
```py
|
||||||
>>> Yo().bitch()
|
>>> Yo().bitch
|
||||||
True
|
True
|
||||||
>>> Yo().__honey()
|
>>> Yo().__honey
|
||||||
AttributeError: 'Yo' object has no attribute '__honey'
|
AttributeError: 'Yo' object has no attribute '__honey'
|
||||||
>>> Yo()._Yo__honey
|
>>> Yo()._Yo__honey
|
||||||
True
|
True
|
||||||
|
Reference in New Issue
Block a user