Closed jdevera closed 5 years ago
I don't recall the exact reason, but it no doubt has something to do with when the default factory is called.
In any event, this is the wrong place for this issue. This repo is just about the backport to 3.6. I suggest you open an issue on bugs.python.org, requesting that this feature be added. We can discuss why it can or can't be done over there.
@jdevera Did you ever open a bug? Just at python.org? Just looking for a link to the discussion if so...
@dmwyatt I didn't, and in the meantime, I have entirely forgotten the context of what I was trying to do. If this is affecting you, python bugs now live here: https://github.com/python/cpython/issues
In any case, there was an answer in my SO question last year: https://stackoverflow.com/a/72332932
Having a
default_factory
in an InitVar is actively prevented, but I do not understand why. Git history inspection doesn't clarify either. I tried SO too: https://stackoverflow.com/questions/57056029/What is the reason behind this restriction?
Could this be easily enabled in newer versions? What would be the process to move that forward if it makes sense?