

def __init__(self, factory, global_factory=None, rollback_reader_sessions=False):
    'Construct a new :class:`.TransactionContext`.\n\n        :param factory: the :class:`.TransactionFactory` which will\n         serve as a source of connectivity.\n\n        :param global_factory: the "global" factory which will be used\n         by the global ``_context_manager`` for new ``_TransactionContext``\n         objects created under this one.  When left as None the actual\n         "global" factory is used.\n\n        :param rollback_reader_sessions: if True, a :class:`.Session` object\n         will have its :meth:`.Session.rollback` method invoked at the end\n         of a ``@reader`` block, actively rolling back the transaction and\n         expiring the objects within, before the :class:`.Session` moves\n         on to be closed, which has the effect of releasing connection\n         resources back to the connection pool and detaching all objects.\n         If False, the :class:`.Session` is\n         not affected at the end of a ``@reader`` block; the underlying\n         connection referred to by this :class:`.Session` will still\n         be released in the enclosing context via the :meth:`.Session.close`\n         method, which still ensures that the DBAPI connection is rolled\n         back, however the objects associated with the :class:`.Session`\n         retain their database-persisted contents after they are detached.\n\n         .. seealso::\n\n            http://docs.sqlalchemy.org/en/rel_0_9/glossary.html#term-released            SQLAlchemy documentation on what "releasing resources" means.\n\n        '
    self.factory = factory
    self.global_factory = global_factory
    self.mode = None
    factory.session = None
    self.connection = None
    self.transaction = None
    kw = self.factory._transaction_ctx_cfg
    self.rollback_reader_sessions = kw['rollback_reader_sessions']

dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/enginefacade.py _TransactionContext.__init__/VarMisuse@40/577 `self`->`factory`