Skip to content
New issue

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

Can we create an ordered dictionary instead of normal dictionary when it's decoded? #49

Closed
ashwin2701 opened this issue Jan 2, 2019 · 1 comment

Comments

@ashwin2701
Copy link

ashwin2701 commented Jan 2, 2019

>>> import asn1tools
>>> foo = asn1tools.compile_files('tests/files/foo.asn')
>>> encoded = foo.encode('Question', {'id': 1, 'question': 'Is 1+1=3?'})
>>> encoded
bytearray(b'0\x0e\x02\x01\x01\x16\x09Is 1+1=3?')
>>> foo.decode('Question', encoded)
{'id': 1, 'question': 'Is 1+1=3?'}

Can we create an ordered dictionary instead of normal dictionary when we decode?

@eerimoq
Copy link
Owner

eerimoq commented Jan 2, 2019

Dictionaries are ordered in Python 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants