Created
April 10, 2014 16:14
-
-
Save MatthieuDartiailh/10398423 to your computer and use it in GitHub Desktop.
Demonstrate the issue with Dict using a Typed as value.
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
from atom.api import Atom, Dict, Str, Typed | |
class aux(Atom): | |
pass | |
class A(Atom): | |
d = Dict(Str(), Typed(aux)) | |
class B(Atom): | |
d = Dict(Str(), Typed(aux)) | |
a = A() | |
a.d = {'a': aux()} | |
b = B() | |
b.d = a.d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment