[issue15003] make PyNamespace_New() public
Éric Araujo
report at bugs.python.org
Tue Jun 12 15:31:53 CEST 2012
Éric Araujo <merwok at netwok.org> added the comment:
>> Is this documented in whatsnew?
> I'm not sure what has been (none of my patches have done so).
Okay; if a committer does not add a note we can open a doc bug to not forget that.
>> 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?
Actually I was talking about making it public at all, i.e. in Python too.
> 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.
Right; I just don’t see why the clock info needs to be a dict instead of a structseq or simplenamespace, but maybe it’s explained in the PEP and I missed it. Also it seems to me that the only advantage of simplenamespace over structseqs is that it has no order and can’t be unpacked; I don’t find that a very strong argument (I do see its value, e.g. “major, minor, *etc = sys.version_info” makes sense but we really don’t want to assign order to sys.implementation elements), but I guess this ship has sailed when the implementation was approved.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15003>
_______________________________________
More information about the Python-bugs-list
mailing list