aug 15
为 DDLog 增加了代码高亮功能,使用的是 SyntaxHighlighter 这个 JS 写的开源代码。
除了字体大小在 shCore.css 强制设置了比默认更大的尺寸之外,其他的部分集成起来很顺利。
哈!最后,贴一段 Python 代码看看:
class FirstClass: # define a class object
def setdata(self, value): # define class methods
self.data = value # self is the instance
def display(self):
print self.data # self.data: per instance
class SecondClass(FirstClass): # inherits setdata
def display(self): # changes display
print 'Current value = "%s"' % self.data
z = SecondClass()
z.setdata(42) # setdata found in FirstClass
z.display() # finds overridden method in SecondClass


Recent Comments