This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ulope
Recipients Julian, barry, benjamin.peterson, eric.araujo, ezio.melotti, georg.brandl, ishimoto, ncoghlan, r.david.murray, serhiy.storchaka, steven.daprano, ulope
Date 2017-05-14.21:20:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494796847.5.0.0105603704053.issue12782@psf.upfronthosting.co.za>
In-reply-to
Content
So this would basically be:

    with ExitStack() as stack:
        cm1 = stack.enter_context(a_long_name.with_a_long_method())
        cm2 = stack.enter_context(another_long_variable.with_a_long_method())

Seems like a very non-obvious and inelegant solution...
History
Date User Action Args
2017-05-14 21:20:47ulopesetrecipients: + ulope, barry, georg.brandl, ishimoto, ncoghlan, benjamin.peterson, ezio.melotti, eric.araujo, steven.daprano, r.david.murray, Julian, serhiy.storchaka
2017-05-14 21:20:47ulopesetmessageid: <1494796847.5.0.0105603704053.issue12782@psf.upfronthosting.co.za>
2017-05-14 21:20:47ulopelinkissue12782 messages
2017-05-14 21:20:47ulopecreate