Actually, the error message should read something like this: A valid instance
of Tk is required.
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
On Sat, Dec 12, 2020 at 07:01:55PM -0800, Ethan Furman wrote:
> That's invalid. Duplicates allowed means:
>
> > ```
> > class K( NamedValue):
> > A = 1
> > B = 1
> > ```
> B is not an alias for A. Presumably one has the same number with different
> meaning. If that were an Enum:
>
On Sat, Dec 12, 2020 at 06:00:17PM -0800, Ethan Furman wrote:
> Enum is great! Okay, okay, my opinion might be biased. ;)
>
> There is one area where Enum is not great -- for a bunch of unrelated
> values.
I don't know how to interpret that. Surely *in practice* enums are
always going to be
On 12/12/20 6:40 PM, Guido van Rossum wrote:
unlike Enum, duplicates are allowed
What does this even mean?
```
class K( NamedValue):
A = 1
A = 2
```
That's invalid. Duplicates allowed means:
> ```
> class K( NamedValue):
> A = 1
> B = 1
> ```
B is not an alias for A.
Okay, I'll bite.
On Sat, Dec 12, 2020 at 6:00 PM Ethan Furman wrote:
> unlike Enum, duplicates are allowed
>
What does this even mean?
```
class K( NamedValues):
A = 1
A = 2
```
Why would I want that?
> unlike Enum, new values can be added after class definition
>
Sure, that points
Hiya :)
I'm recently working with tkinter and I noticed that:
>>> import tkinter as tk
>>> string_var = tk.StringVar()
is throwing an AttributeError:
> Traceback (most recent call last):
> . . .
> File "...\lib\tkinter\__init__.py", line 505, in __init__
> Variable.__init__(self,
Enum is great! Okay, okay, my opinion might be biased. ;)
There is one area where Enum is not great -- for a bunch of unrelated values. What would be nice is if we had something
similar to Enum for the
- repr()
- constantness of the name/value relationship
While I was looking in the
On Thu, Dec 10, 2020 at 09:18:32PM -, redrad...@gmail.com wrote:
> I do not want to make type-checker a part of CPython, I just what
> options that will allow to run python with first some type-checker ...
Okay. So we have a standard interpreter option to run a type-checker.
Then tomorrow
It is not to get something in stdlib, it is simple option in cli ))
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
On Fri, Dec 11, 2020 at 07:41:27PM -0500, Jonathan Crall wrote:
> If `__if__` was defined then
>
> ```
> with Ctx():
> print('hi')
> ```
>
> would only print `hi` if `__if__` returned True. This doesn't require a
> syntax change.
How do you pass arguments to the "if" dunder? A generalised
10 matches
Mail list logo