Created
October 13, 2017 19:10
-
-
Save rafal-jaworski/cfa2393a6c7f2d5b251c4db9660914ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: class C(): | |
...: def __x(self): | |
...: return 0 | |
...: | |
In [2]: c = C() | |
In [3]: dir(c) | |
Out[3]: | |
['_C__x', | |
'__class__', | |
'__delattr__', | |
'__dict__', | |
'__dir__', | |
'__doc__', | |
'__eq__', | |
'__format__', | |
'__ge__', | |
'__getattribute__', | |
'__gt__', | |
'__hash__', | |
'__init__', | |
'__le__', | |
'__lt__', | |
'__module__', | |
'__ne__', | |
'__new__', | |
'__reduce__', | |
'__reduce_ex__', | |
'__repr__', | |
'__setattr__', | |
'__sizeof__', | |
'__str__', | |
'__subclasshook__', | |
'__weakref__'] | |
In [4]: c._C__x() | |
Out[4]: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment