[Python-ideas] Re: SimpleNamespace vs object

2021-02-21 Thread Paul Sokolovsky
Hello, On Mon, 22 Feb 2021 18:26:28 +1100 Chris Angelico wrote: > On Mon, Feb 22, 2021 at 6:08 PM Paul Sokolovsky > wrote: > > One explanation why SimpleNamespace is not in "collections" is > > because ... it's not a collection. One of the basic traits of any > > collection is that it "contains

[Python-ideas] Re: SimpleNamespace vs object

2021-02-21 Thread Chris Angelico
On Mon, Feb 22, 2021 at 6:27 PM Paul Sokolovsky wrote: > > Hello, > > On Mon, 22 Feb 2021 15:51:37 +1100 > Chris Angelico wrote: > > [] > > > In my mind, the current front-runners are: > > > > * namespace > > > * ns > > * thing > > * mobject > > * bunch > > Such short generic names shouldn't be u

[Python-ideas] Re: SimpleNamespace vs object

2021-02-21 Thread Paul Sokolovsky
Hello, On Mon, 22 Feb 2021 15:51:37 +1100 Chris Angelico wrote: [] > In my mind, the current front-runners are: > > * namespace > * ns > * thing > * mobject > * bunch Such short generic names shouldn't be used for types added so late in the language evolution. Those are names for variables.

[Python-ideas] Re: SimpleNamespace vs object

2021-02-21 Thread Chris Angelico
On Mon, Feb 22, 2021 at 6:08 PM Paul Sokolovsky wrote: > One explanation why SimpleNamespace is not in "collections" is because > ... it's not a collection. One of the basic traits of any collection is > that it "contains" things, and thus it can be directly iterated over to > traverse those conte

[Python-ideas] Re: SimpleNamespace vs object

2021-02-21 Thread Paul Sokolovsky
Hello, On Sun, 21 Feb 2021 16:51:37 -0800 Brendan Barnwell wrote: > On 2021-02-17 11:21, Chris Angelico wrote: > > 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-21 Thread Chris Angelico
On Mon, Feb 22, 2021 at 1:11 PM Brendan Barnwell wrote: > > On 2021-02-17 11:21, Chris Angelico wrote: > > 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

[Python-ideas] Re: SimpleNamespace vs object

2021-02-21 Thread David Mertz
On Mon, Feb 22, 2021 at 2:09 AM Brendan Barnwell wrote: > Thinking about this more, I think the main obstacle to use of > SimpleNamespace isn't the name, it's its the location. No one is going > to look in the types module for something like this. Why not just put > SimpleNamespace in t

[Python-ideas] Re: SimpleNamespace vs object

2021-02-21 Thread Brendan Barnwell
On 2021-02-17 11:21, Chris Angelico wrote: 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 "object"

[Python-ideas] Inadequate error reporting during function call setup stage

2021-02-21 Thread Paul Sokolovsky
Hello, Here's example: Traceback (most recent call last): File "pseudoc_tool.py", line 91, in first_class_function_value(func, **pass_params) TypeError: print() got an unexpected keyword argument 'noann' Ok, which "print" do you mean, dear CPython? I have a dozen of print functions (most