TL;DR Changes may be coming to Enum str() and repr() -- your (informed)
opinion requested. :-)
Python-Dev thread [0], summary below:
As you may have noticed, Enums are starting to pop up all over the stdlib [1].
To facilitate transforming existing module constants to IntEnums there is
`Int
On Wed, Nov 4, 2020 at 6:11 AM Ethan Furman wrote:
>
> TL;DR Changes may be coming to Enum str() and repr() -- your (informed)
> opinion requested. :-)
>
> After discussions with Guido I made a (largely done) PR [3] which:
>
> for stdlib global constants (such as RE)
> - repr() -> uses `mod
On 11/3/20 11:26 AM, Chris Angelico wrote:
On Wed, Nov 4, 2020 at 6:11 AM Ethan Furman wrote:
TL;DR Changes may be coming to Enum str() and repr() -- your (informed)
opinion requested. :-)
Does this affect my own enums too, or just stdlib ones? I'm not
entirely sure on that point.
That
On Tue, Nov 03, 2020 at 11:10:37AM -0800, Ethan Furman wrote:
> After discussions with Guido I made a (largely done) PR [3] which:
>
> for stdlib global constants (such as RE)
>- repr() -> uses `module.member_name`
>- str() -> uses `member_name`
What's `RE`? Do you mean the enums in the
I have recently have the opportunity to work on a Python web application. I've
found it beneficial to reduce duplicate code with the following code lines
import textwrap
from pathlib import Path
exec(textwrap.dedent(Path('myfile.py').read_text()))
Perhaps such code could be the basis for a pyt
On 11/3/20 3:58 PM, Steven D'Aprano wrote:
On Tue, Nov 03, 2020 at 11:10:37AM -0800, Ethan Furman wrote:
After discussions with Guido I made a (largely done) PR [3] which:
for stdlib global constants (such as RE)
- repr() -> uses `module.member_name`
- str() -> uses `member_name`
Wha
```
import myfile
```
or
```
from myfile import *
```
Will import the names from another file. You should use this instead of
executing text read from a path.
Thanks,
*Cade Brown*
Research Assistant @ ICL (Innovative Computing Laboratory)
Personal Email: [email protected]
ICL/College Em