[issue22123] Provide a direct function for types.SimpleNamespace()

2019-02-24 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Five years have passed with no one pushing this forward.  During that time, 
types.SimpleNamespace() has diminished in popularity and dataclasses have risen 
as a better general purpose data holder.

Marking this as closed.

--
resolution:  -> rejected
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2019-02-24 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2015-07-21 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-12-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

-1 on moving this to builtin status.  For a long time, we've tried to keep a 
back pressure against adding more builtins (in part because it increases the 
learning curve for the core language).   The SimpleNamespace() type would need 
to become *much* more popular to warrant becoming a builtin (even then, other 
tools such as copy.copy() or collections.OrderedDict() would likely be able to 
make stronger claims).  AFAICT, the SimpleNamespace() class has been used 
exactly once is the standard library (in venv) and almost not at all in 
published code.  IMO, it is *very* far from warranting builtin status.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-12-08 Thread Eric Snow

Eric Snow added the comment:

 It's not a builtin yet, solely because we get far fewer arguments about the 
 contents of the types module than we do builtins :)

Exactly.  As Mark noted, I did have hopes of it reaching that status though. :) 
So +1 from me for adding the namespace builtin!

--
nosy: +eric.snow

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-07 Thread Mark Summerfield

Mark Summerfield added the comment:

I'd be happy to draft a PEP if it is needed, if no one else has the 
time/inclination.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-06 Thread Mark Dickinson

Mark Dickinson added the comment:

+1 for the 'namespace' builtin.  It looks as though whoever wrote 
`SimpleNamespace.__repr__` anticipated this:

 ns = types.SimpleNamespace(a=3, b=4)
 ns
namespace(a=3, b=4)

--
nosy: +mark.dickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-06 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti, ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-06 Thread Nick Coghlan

Nick Coghlan added the comment:

types.SimpleNamespace was added as an implementation detail of the 
sys.implementation PEP. It's not a builtin yet, solely because we get far 
fewer arguments about the contents of the types module than we do builtins :)

I'd be +1 on a PEP to also expose it as a namespace builtin.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-06 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Aug 06, 2014, at 09:43 PM, Nick Coghlan wrote:

I'd be +1 on a PEP to also expose it as a namespace builtin.

Is a PEP necessary?  Seems like a rather isolated and simple enhancement.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-06 Thread Nick Coghlan

Nick Coghlan added the comment:

It's a new builtin, so I think at least a simple PEP is needed for
traceability. The existence of types.SimpleNamespace should let us duck 99%
of the bikeshedding - it's a new name for an existing type, not a new type.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Agreed that a PEP would be necessary, even if it ends up sweet and simple.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-03 Thread Mark Summerfield

Mark Summerfield added the comment:

I changed my suggestion but did so on the mailing list instead of here:

This (importing  using types.SimpleNamespace()) is too much for children ( 
beginners).

But perhaps what I should be asking for is for a new built-in that does what 
types.SimpleNamespace() does, so that without any import you can write, say,

foo = namespace(a=1, b=2)
# or
bar = namespace()
bar.a = 1

where under the hood namespace has the same behavior as types.SimpleNamespace().

Naturally, I understand that adding a new name is a big deal and may be too 
much to ask for beginners. 

I've renamed the issue to reflect this (although I don't know if that will 
work).

Alternatively, I (or someone) could just close the issue as won't fix; it was 
just an idea.

--
title: Make object() behave exactly like types.SimpleNamespace() if given 
kwargs - Provide a direct function for types.SimpleNamespace()

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

I'm not in favor of changing object() but exposing types.SimpleNamespace as 
built-in namespace() doesn't seem like such a bad idea, especially given Tim's 
penultimate Zen aphorism.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-03 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com