diff options
author | Ilya Etingof <etingof@gmail.com> | 2017-02-02 21:59:53 +0100 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2017-02-02 21:59:53 +0100 |
commit | ceb6aaf9e575bb75f7b906f680d6ee622114e029 (patch) | |
tree | 989d6befb9e6c1a1003b7a72a0f4b00019659f0e /README.md | |
parent | e4d065825fd0e6ae489bc1f913f8f03251a4011f (diff) | |
download | pyasn1-ceb6aaf9e575bb75f7b906f680d6ee622114e029.tar.gz |
note dict protocol in example
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -114,15 +114,15 @@ introspect, modify, encode and send back. ```python >>> received_record, rest_of_substrate = decode(substrate, asn1Spec=Record()) >>> ->>> print(received_record.prettyPrint()) -Record: - id=123 - room=321 - house=0 +>>> for field in received_record: +>>> print('{} is {}'.format(field, received_record[field])) +id is 123 +room is 321 +house is 0 >>> >>> record == received_record True ->>> received_record['room'] = 123 +>>> received_record.update(room=123) >>> substrate = encode(received_record) >>> hexdump(substrate) 00000: 30 06 02 01 7B 80 01 7B |