Apr-11-2022, 09:44 PM
Do __enter__ and __exit__ methods make sense for your classes? If so, you can use a context manager.
Decimal context
|
|
Messages In This Thread |
Decimal context - by stevendaprano - Apr-11-2022, 05:03 PM
RE: Decimal context - by deanhystad - Apr-11-2022, 09:44 PM
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Context-sensitive delimiter | ZZTurn | 9 | 1,517 |
May-16-2023, 07:31 AM Last Post: Gribouillis |
|
How does open context manager work? | deanhystad | 7 | 1,355 |
Nov-08-2022, 02:45 PM Last Post: deanhystad |
|
TextIOWrapper.tell() with Python 3.6.9 in context of 0D/0A | fschaef | 0 | 2,086 |
Mar-29-2020, 09:18 AM Last Post: fschaef |
|
testing for Decimal w/o importing decimal every time | Skaperen | 7 | 4,477 |
May-06-2019, 10:23 PM Last Post: Skaperen |
|
Smtplib: What does context argument means? | Pythenx | 1 | 3,097 |
Mar-27-2019, 06:25 PM Last Post: nilamo |
|
Dealing with multiple context managers | heras | 5 | 4,732 |
Nov-16-2018, 09:01 AM Last Post: DeaD_EyE |
|
Context Manager (with) | wyattbiker | 3 | 3,797 |
Jul-23-2018, 03:19 PM Last Post: snippsat |