背景:来自Perl世界,我目前正在学习Python 工作。除了做这项工作,我还试着获得更多的“真正的OOP” 而“Python”思维进入我的脑细胞流中,大多是通过阅读所以,Python 文件和各种文章。在
现在在Anti-pattern页面的OO设计部分,Wikipedia列出了这一点 BaseBean,在its own page上描述为:
In object-oriented programming, a BaseBean is a utility object from which concrete entities are derived (via subclassing). Proper design suggests that the inherited functionality should be provided via delegation instead. The BaseBean is an example of an anti-pattern (where the "Bean" part of the name comes from the standard Java naming convention for a generic entity object, or JavaBean).
可能是因为我没有Java的经验,也可能是其他原因, 但我很难理解这个解释。但是,我 感觉几行代码就值几千字。在
有人能帮我澄清一下吗?最好使用Python中的一个简单示例?在
根据维基百科文章中的这句话:
它似乎是指这样的东西:
相关问题 更多 >
编程相关推荐