We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given three files:
#module_1.py from typed_python import Alternative, SerializationContext, Entrypoint def clone(x): return SerializationContext().deserialize(SerializationContext().serialize(x)) @Entrypoint def test_alternative_hashing(): A = Alternative("A", A=dict(a=int)) print('A from module 1', A, 'clones to', clone(A)) return A test_alternative_hashing()
#module_2.py from typed_python import Alternative, SerializationContext, Entrypoint from alternative_serialisation_module import clone @Entrypoint def test_alternative_hashing_2(): A = Alternative("A", A=dict(a=int)) print('A from module 2', A, 'clones to', clone(A)) return A test_alternative_hashing_2()
#module_3.py from module_1 import test_alternative_hashing from module_2 import test_alternative_hashing_2
Run module_3.py.
module_3.py
A from module 1 <class 'module_1.A'> clones to <class 'module_1.A'> A from module 2 <class 'module_2.A'> clones to <class 'module_2.A'>
A from module 1 <class 'module_1.A'> clones to <class 'module_1.A'> A from module 2 <class 'module_2.A'> clones to <class 'module_1.A'>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given three files:
Run
module_3.py
.Expected output
Actual output
The text was updated successfully, but these errors were encountered: