-
- Downloads
Change `SequenceOf`/`SetOf` behaviour
- New elements to `SequenceOf`/`SetOf` objects can now be added at any position - the requirement for the new elements to reside at the end of the existing ones (i.e. s[len(s)] = 123) is removed. - Removed default initializer from `SequenceOf`/`SetOf` types to ensure consistent behaviour with the rest of ASN.1 types. Before this change, `SequenceOf`/`SetOf` instances immediately become value objects behaving like an empty list. With this change, `SequenceOf`/`SetOf` objects remain schema objects unless a component is added or `.clear()` is called. - Added `.reset()` method to all constructed types to turn value object into a schema object.
Showing
- CHANGES.rst 22 additions, 1 deletionCHANGES.rst
- pyasn1/codec/ber/decoder.py 4 additions, 0 deletionspyasn1/codec/ber/decoder.py
- pyasn1/type/base.py 14 additions, 17 deletionspyasn1/type/base.py
- pyasn1/type/univ.py 136 additions, 39 deletionspyasn1/type/univ.py
- tests/codec/ber/test_encoder.py 2 additions, 0 deletionstests/codec/ber/test_encoder.py
- tests/codec/cer/test_encoder.py 2 additions, 0 deletionstests/codec/cer/test_encoder.py
- tests/type/test_univ.py 145 additions, 25 deletionstests/type/test_univ.py
Loading
Please register or sign in to comment