Create a modified version of |ASN.1| schema or value object. The `clone()` method accepts the same set arguments as |ASN.1| class takes on instantiation except that all arguments of the `clone()` method are optional. Whatever arguments are supplied, they are used to
(self, value=noValue, **kwargs)
| 345 | return self._value is not noValue |
| 346 | |
| 347 | def clone(self, value=noValue, **kwargs): |
| 348 | """Create a modified version of |ASN.1| schema or value object. |
| 349 | |
| 350 | The `clone()` method accepts the same set arguments as |ASN.1| |
| 351 | class takes on instantiation except that all arguments |
| 352 | of the `clone()` method are optional. |
| 353 | |
| 354 | Whatever arguments are supplied, they are used to create a copy |
| 355 | of `self` taking precedence over the ones used to instantiate `self`. |
| 356 | |
| 357 | Note |
| 358 | ---- |
| 359 | Due to the immutable nature of the |ASN.1| object, if no arguments |
| 360 | are supplied, no new |ASN.1| object will be created and `self` will |
| 361 | be returned instead. |
| 362 | """ |
| 363 | if value is noValue: |
| 364 | if not kwargs: |
| 365 | return self |
| 366 | |
| 367 | value = self._value |
| 368 | |
| 369 | initializers = self.readOnly.copy() |
| 370 | initializers.update(kwargs) |
| 371 | |
| 372 | return self.__class__(value, **initializers) |
| 373 | |
| 374 | def subtype(self, value=noValue, **kwargs): |
| 375 | """Create a specialization of |ASN.1| schema or value object. |
no test coverage detected