mirror of
https://github.com/satwikkansal/wtfpython
synced 2024-12-22 21:00:09 +01:00
Minor corrections in previous example
This commit is contained in:
parent
7909c0b1ad
commit
78a1218dbd
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
|
||||
# Name mangling:
|
||||
class Yo(object):
|
||||
def __init__(self):
|
||||
self.__honey = True
|
||||
@ -1719,9 +1718,9 @@ class Yo(object):
|
||||
|
||||
**Output:**
|
||||
```py
|
||||
>>> Yo().bitch()
|
||||
>>> Yo().bitch
|
||||
True
|
||||
>>> Yo().__honey()
|
||||
>>> Yo().__honey
|
||||
AttributeError: 'Yo' object has no attribute '__honey'
|
||||
>>> Yo()._Yo__honey
|
||||
True
|
||||
|
Loading…
x
Reference in New Issue
Block a user