'The set of all persistent instances considered dirty.
E.g.::
some_mapped_object in session.dirty
Instances are considered dirty when they were modified but not
deleted.
Note that this \'dirty\' calculation is \'optimistic\'; most
attribute-setting or collection modification operations will
mark an instance as \'dirty\' and place it in this set, even if
there is no net change to the attribute\'s value.  At flush
time, the value of each attribute is compared to its
previously saved value, and if there\'s no net change, no SQL
operation will occur (this is a more expensive operation so
it\'s only done at flush time).
To check if an instance has actionable net changes to its
attributes, use the :meth:`.Session.is_modified` method.'

@property
def dirty(self):

    return util.IdentitySet([state.obj() for state in self._dirty_states if (state not in self._deleted)])
