class_docstr: Raised when trying to assign a value with a type that doesn't match the declared type.
  
  Attributes:
  source_class -- The class of the record
  field -- Field name
  expected_types  -- Types allowed for the field
  actual_type -- The non matching type
code: def __init__(
      self,
      source_class,
      field,
      expected_types,
      actual_type,
      *args,
      **kwargs,
  ):
      super(PTypeError, self).__init__(*args, **kwargs)
      self.source_class = source_class
      self.field = field
      self.expected_types = expected_types
      self.actual_type = actual_type
  
imports: import six
  import sys
  from pyrsistent._checked_types import CheckedPMap, CheckedPSet, CheckedPVector, CheckedType, InvariantException, _restore_pickle, get_type, maybe_parse_user_type, maybe_parse_many_user_types
  from pyrsistent._checked_types import optional
  from pyrsistent._checked_types import wrap_invariant
  import inspect
label_desc: Use image node_id 1 to create a new PTypeError object from inherited base classes: TypeError with example: obj = PTypeError(source_class, field, expected_types, actual_type)