[Python-ideas] Re: Syntax for duplicate types in seq[...]

2021-02-20 Thread Christopher Barker
On Fri, Feb 19, 2021 at 9:17 PM Dennis Sweeney wrote: > Does this work? > > >>> tuple[(int,) * 7 + (str,)] > tuple[int, int, int, int, int, int, int, str] Even better: TImeTuple = tuple[(int,) * 7 + (str,)] and then: def time() ->TimeTuple ... -CHB -- Christopher Barker, Ph

[Python-ideas] Re: SimpleNamespace vs object

2021-02-20 Thread Jan Kaliszewski
2021-02-17 Ricky Teachey dixit: > * patsy I love this one! :-) Cheers. *j PS. But it should be callable and, when called, it should raise RuntimeError("It's only a model!") ___ Python-ideas mailing list -- [email protected] To unsubscribe se

[Python-ideas] Re: SimpleNamespace vs object

2021-02-20 Thread Ricky Teachey
On Sat, Feb 20, 2021, 12:56 PM Jan Kaliszewski wrote: > 2021-02-17 Ricky Teachey dixit: > > > * patsy > > I love this one! :-) > > Cheers. > *j > > PS. But it should be callable and, when called, it should raise > RuntimeError("It's only a model!") > Have to admit I was proud of this idea. Hah

[Python-ideas] Re: SimpleNamespace vs object

2021-02-20 Thread Jan Kaliszewski
2021-02-18 Chris Angelico dixit: [...] > Okay. Let's start bikeshedding. If SimpleNamespace were to become a > builtin, what should its name be? It needs to be short (obviously), > but not TOO short, and it needs to be at least somewhat descriptive, > and it needs to not cause confusion with "obj

[Python-ideas] Re: SimpleNamespace vs object

2021-02-20 Thread David Mertz
Cheeseshop! On Sat, Feb 20, 2021, 1:08 PM Jan Kaliszewski wrote: > 2021-02-18 Chris Angelico dixit: > > [...] > > Okay. Let's start bikeshedding. If SimpleNamespace were to become a > > builtin, what should its name be? It needs to be short (obviously), > > but not TOO short, and it needs to be

[Python-ideas] Re: SimpleNamespace vs object

2021-02-20 Thread 2QdxY4RzWzUUiLuE
On 2021-02-20 at 13:44:21 -0500, David Mertz wrote: > Cheeseshop! But then it would never contain the attribute I ask for, and throw a different exception every time! ;-) ___ Python-ideas mailing list -- [email protected] To unsubscribe send an

[Python-ideas] Re: SimpleNamespace vs object

2021-02-20 Thread Steven D'Aprano
Are we just trying to list every imaginable word that is even vaguely related to the concept of "something that holds something"? If we have plate, tray, board then surely we should include saucer, cup, bowl, pot, frying_pan, cheeseboard, box, suitcase, luggage, handbag, ... Trying to exhaustiv