[Python-ideas] Re: Auto dedent -c arguments.

2023-04-05 Thread Cameron Simpson
On 05Apr2023 10:01, Lucas Wiman wrote: On Tue, Apr 4, 2023 at 7:19 AM Jonathan Crall wrote: Would there be any downside to the Python CLI automatically dedenting the input string given to -c? I can't think of any case off the top of my head where it would make a previously valid program inval

[Python-ideas] Re: Auto dedent -c arguments.

2023-04-05 Thread Lucas Wiman
On Tue, Apr 4, 2023 at 7:19 AM Jonathan Crall wrote: > Would there be any downside to the Python CLI automatically dedenting the > input string given to -c? I can't think of any case off the top of my head > where it would make a previously valid program invalid. Unless I'm missing > something th

[Python-ideas] Re: len(Enum) should raise TypeError

2023-04-05 Thread Thomas Grainger
mypy does not detect this as a problem because EnumMeta has a `.__len__` method https://github.com/python/typeshed/blob/60939b00afede13feeec3cee6f6dfe6eb2df1593/stdlib/enum.pyi#L121 what would the type hints look like if len(Enum) failed but class Foo(Enum): pass len(Foo) succeeds? _

[Python-ideas] Re: len(Enum) should raise TypeError

2023-04-05 Thread Richard Hajek
> Can any Python linting tools (such as pylint) detect a potential > problem with the code? Hey, I checked mypy, flake8, pylint, all did not see this as a problem. My native IDE ( PyCharm ) also saw no problem with it. ___ Python-ideas mailing list -- p