Message404620
On Wed, Oct 20, 2021 at 6:11 PM Barry A. Warsaw <report@bugs.python.org> wrote:
> This is what leads me to think that having a proxy to keep them in sync and relaxing the read-only restriction is the path forward, even if writing __package__ doesn’t make sense. It also seems like the easier way to keep backward compatibility, rather than enforcing read-only on __package__ to match __spec__.parent.
>
> So the question is less about whether this is useful than whether it will break things if they write to it.
I don't see any significant problem with making spec.parent writable.
It's read-only now only because it is computed from spec.name and any
other value doesn't make sense (which read-only communicates). My
preference would be to make __package__ read-only instead. :)
However, I doubt it will make a difference in practice either way, so
I'm fine either way. |
|
Date |
User |
Action |
Args |
2021-10-21 16:52:50 | eric.snow | set | recipients:
+ eric.snow, barry, brett.cannon |
2021-10-21 16:52:50 | eric.snow | link | issue45540 messages |
2021-10-21 16:52:50 | eric.snow | create | |
|