Created
September 30, 2016 17:59
-
-
Save edcrypt/b65c23c0add0e13c2d33b243c912557e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pykka | |
class Prototype(pykka.ThreadingActor): | |
def __init__(self, *args, **kw): | |
import treedict | |
self.properties = treedict.TreeDict() | |
self.properties.pykka_traversable = True | |
super().__init__(*args, **kw) | |
def clone(self): | |
new_obj = Prototype.start().proxy() | |
new_obj.properties.attach(self.properties, copy=False).get() | |
return new_obj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment