Eric Snow <ericsnowcurren...@gmail.com> added the comment:

> Is this documented in whatsnew?

I'm not sure what has been (none of my patches have done so).

> Also, I remember a discussion about making it public or not, but
> don’t recall a decision.

Amaury brought it up in msg162127.  His point was that the type is public in 
Python, so why not the C API?  That's about the extent of the discussion.  :)  
Do you see any harm in making PyNamespace_New() public?

> I personally find it bad that we have structseqs for most things, dicts
> in PEP 418 get_clock_info return values, and now simplenamespace for
> sys.implementation.

The use cases are different for the different types.  StructSequence/namedtuple 
provides fixed data structures for structured records.  A dict is essentially 
the opposite: an un-fixed data structure for dynamic namespaces, making no firm 
promises as to what the future holds.

SimpleNamespace fills a similar role to dicts, but offers a higher appearance 
of stability by virtue of using attributes vs. keys.  The problem is that 
moving from item-access to attribute-access is not a backward-compatible 
change.  That's the big reason why PEP 421 specified the use of an attr-based 
object.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15003>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to