test.py中的代码:
class Base(object):
def __init__(self, l=[]):
self.l = l
def add(self, num):
self.l.append(num)
def remove(self, num):
self.l.remove(num)
class Derived(Base):
def __init__(self, l=[]):
super(Derived, self).__init__(l)
Run Code Online (Sandbox Code Playgroud)
Python shell会话:
Python 2.6.5 (r265:79063, Apr 1 2010, 05:22:20)
[GCC 4.4.3 20100316 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import test
>>> a = test.Derived()
>>> b = test.Derived()
>>> a.l
[]
>>> b.l
[]
>>> a.add(1)
>>> a.l
[1]
>>> b.l
[1]
>>> c = test.Derived()
>>> c.l
[1] …Run Code Online (Sandbox Code Playgroud) 正如在这里所要求的:Evernote是如何在iOS上实现他们的富文本编辑器的?
我一直在努力为Android上的富文本编辑找到第三方库.我刚刚安装了Evernote的Android客户端,他们有一个非常好的解决方案.有谁知道他们是怎么做到的?
编辑
对于任何人来说,Wordpress应用程序包含一个开源的WYSIWYG-ish编辑器:
https://android.trac.wordpress.org/browser/trunk/src/org/wordpress/android/EditContent.java