Re: Question regarding unexpected behavior in using __enter__ method

2023-04-20 Thread Cameron Simpson
On 21Apr2023 00:44, Lorenzo Catoni wrote: I am writing to seek your assistance in understanding an unexpected behavior that I encountered while using the __enter__ method. I have provided a code snippet below to illustrate the problem: ``` class X: ... __enter__ = int ... __exit__ = l

Re: Question regarding unexpected behavior in using __enter__ method

2023-04-20 Thread dn via Python-list
On 21/04/2023 10.44, Lorenzo Catoni wrote: I am writing to seek your assistance in understanding an unexpected behavior that I encountered while using the __enter__ method. I have provided a code snippet below to illustrate the problem: It is expected behavior - just not what WE might have expe

Question regarding unexpected behavior in using __enter__ method

2023-04-20 Thread Lorenzo Catoni
Dear Python Mailing List members, I am writing to seek your assistance in understanding an unexpected behavior that I encountered while using the __enter__ method. I have provided a code snippet below to illustrate the problem: ``` >>> class X: ... __enter__ = int ... __exit__ = lambda *_

Re: PyCharm's strict PEP and not so strict?

2023-04-20 Thread Mats Wichmann
On 4/19/23 17:19, dn via Python-list wrote: The "light bulb" has little to do with "quotes"! This is one of the advantages of utilising a Python-native IDE (cf a more general-purpose alternative, perhaps with some Python add-on). PyCharm attempts to understand the code it is editing, and apply

Re: PyCharm's strict PEP and not so strict?

2023-04-20 Thread Thomas Passin
On 4/19/2023 7:19 PM, dn via Python-list wrote: *PyCharm enables a range of Python-linters. Some by add-in. Some by "External tools"* I was not 'up' on "linters", Thanks for the heads up! Attempted finding a "linter" on jetbrains... I take it that finding a 'linter' for Build #PC-222.4554.11

Re: Pycharm IDE

2023-04-20 Thread Thomas Passin
On 4/19/2023 7:48 PM, dn via Python-list wrote: On 20/04/2023 08.59, Thomas Passin wrote: On 4/19/2023 4:06 PM, Mark Bourne wrote: print(f'{LIMIT}) ^ I think this one should be: print(f'{LIMIT}') with the closing quote ;o) Yup a typo!  Where's pylint when I need it? but (and you design