扫码关注官方订阅号
在看代码的时候,发现了类的嵌套定义,不知道这样的嵌套的定义有什么好处呢?怎么用呢?class a:
class b: pass class c: pass
光阴似箭催人老,日月如移越少年。
通常表示两个类有从属关系
inner class. http://stackoverflow.com/questions/719705/what-is-the-purpose-of-pythons-inner-classes
基本原理一样。封装。可见度。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
通常表示两个类有从属关系
inner class.
http://stackoverflow.com/questions/719705/what-is-the-purpose-of-pythons-inner-classes
基本原理一样。封装。可见度。