[issue38315] Provide defaultdict variant that passes key to default_factory

2019-09-30 Thread Mark Amery
Mark Amery added the comment: I'm aware of __missing__. However, I don't think its existence is by itself a knockdown argument against doing this. __missing__ also fulfils the need satisfied by defaultdict, yet Python still has both - and the latter is almost always more conveni

[issue38315] Provide defaultdict variant that passes key to default_factory

2019-09-29 Thread Mark Amery
New submission from Mark Amery : There seems to be at least some demand for the ability to have the key being accessed be passed to the factory function of a defaultdict. See e.g. https://stackoverflow.com/q/2912231/1709587 (13k views) or previous enhancement suggestion https

[issue35651] PEP 257 (active) references PEP 258 (rejected) as if it were active

2019-01-03 Thread Mark Amery
New submission from Mark Amery : PEP 257 says: > Please see PEP 258, "Docutils Design Specification" [2], for a detailed > description of attribute and additional docstrings. But PEP 258 is rejected. It doesn't seem coherent that an active PEP can defer some of its deta