In this installment I have shown far too many ways to make Python instance attributes act like (or be) method calls, but I really do not have any clear advice on how to cut through the complexity.
在本期文章中,我展示了大量方法,使Python实例属性的行为类似于(或变成)方法调用,但是对于如何减少复杂性,我确实提不出什么明确的建议来。
Listing 4 shows a first cut at an implementation of visit (Code) and visit (CodeException) that accumulates information about all the catch blocks in a method.
清单4了显示实现visit (Code)和visit (CodeException)的第一步,它将积累方法中所有catch块的信息。
If you’re following the GTD method (Getting Things Done), look at your list of to-dos and see if you could cut that list in half.
如果你想遵循GTD法(完成任务法),就浏览一下你的待办事务清单,看看能不能将其减半。
应用推荐