Python Forum
How does open context manager work?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How does open context manager work?
#6
So the reason why you can use open() in both a context (with open() as f:) and like a function (f = open()) is because open is special?
Reply


Messages In This Thread
How does open context manager work? - by deanhystad - Nov-07-2022, 06:15 PM
RE: How does open context manager work? - by Yoriz - Nov-07-2022, 06:17 PM
RE: How does open context manager work? - by deanhystad - Nov-08-2022, 01:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to not open the context menu if a mouse gesture is executed? MicheliBarcello 2 1,536 Aug-22-2023, 02:47 PM
Last Post: deanhystad
  Open a new window does not work Nietzsche 4 2,471 Jun-14-2023, 08:52 AM
Last Post: Nietzsche
  with open context inside of a recursive function billykid999 1 1,408 May-23-2023, 02:37 AM
Last Post: deanhystad
  Context-sensitive delimiter ZZTurn 9 3,429 May-16-2023, 07:31 AM
Last Post: Gribouillis
  Decimal context stevendaprano 1 1,642 Apr-11-2022, 09:44 PM
Last Post: deanhystad
  How to create an app manager _ShevaKadu 8 5,642 Nov-01-2020, 12:47 PM
Last Post: _ShevaKadu
  TextIOWrapper.tell() with Python 3.6.9 in context of 0D/0A fschaef 0 2,816 Mar-29-2020, 09:18 AM
Last Post: fschaef
  Is it OK to use a context manager to simplify attribute access? nholtz 0 2,591 Jun-11-2019, 01:19 AM
Last Post: nholtz
  Smtplib: What does context argument means? Pythenx 1 3,991 Mar-27-2019, 06:25 PM
Last Post: nilamo
  Dealing with multiple context managers heras 5 7,571 Nov-16-2018, 09:01 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020