# #
## 1 ##
Java public private
Python
`__private_attrs` `self.__private_attrs`
Python
Python

```python
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
class UserInfo(object):
def __init__(self, name, age, account):
self.name = name
self._age = age
self.__account = account
def get_account(self):
return self.__account
if __name__ == '__main__':
userInfo = UserInfo('', 23, 347073565);
#
print(dir(userInfo))
#
print(userInfo.__dict__)
print(userInfo.get_account())
#
print(userInfo._UserInfo__account)
```

## 2 ##
| | |
| ------| ------ |
|`__init__` ||
|`__del__ `| |
|`__repr__ `| |
|`__setitem__ `| |
|`__getitem__`| |
|`__len__`| |
|`__cmp__`| |
|`__call__`| |
|`__add__`| |
|`__sub__`| |
|`__mul__`||
|`__div__`| |
|`__mod__`| |
|`__pow__`||
* `type(obj)`
* `isinstance(obj, type)` type
* `hasattr(obj, attr)`/
* `getattr(obj, attr[, default])` /, default default AttributeError
* `setattr(obj, attr, value)`/ obj.attr=value
* `dir(obj)`
## 3 ##
Python
```python
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
class User(object):
def upgrade(self):
pass
def _buy_equipment(self):
pass
def __pk(self):
pass
```