On Wed, 29 Dec 2021 at 07:46, Inada Naoki wrote:
> You are right. I thought PyObject_GC_Track() can be used to tracked
> objects because PyObject_GC_Untrack() can be used untracked object.
> I think there is no enough reason for this asymmetry.
>
> Additionally, adding PyObject_GC_IsTracked() to p
On Wed, 29 Dec 2021 at 00:03, Dieter Maurer wrote:
> Why do you not derive from `dict` and override its mutating methods
> (to raise a type error after initialization is complete)?
I've done this for the pure py version, for speed. But in this way,
frozendict results to be a subclass of MutableMa
On Wed, Dec 29, 2021 at 5:18 AM Marco Sulla
wrote:
>
>
> > But PyObject_GC_Track() is a public API.
>
> The problem is I can't invoke PyObject_GC_Track() on an already
> tracked object. I tried it and Python segfaulted. That's why CPython
> uses _PyObject_GC_IS_TRACKED() before.
>
You are right.
You can use --upgrade-deps option. My alias is:
alias mkvenv='python3 -m venv --upgrade-deps --prompt . venv'
On Wed, Dec 29, 2021 at 4:55 AM Marco Sulla
wrote:
>
> I think it's very boring that, after creating a venv, you have
> immediately to do every time:
>
> pip install -U pip
>
> Can't v
Marco Sulla wrote at 2021-12-27 19:30 +0100:
>I need it since I'm developing an immutable dict. And in dict that
>function is used.
Why do you not derive from `dict` and override its mutating methods
(to raise a type error after initialization is complete)?
--
https://mail.python.org/mailman/list
On Tue, 28 Dec 2021 at 12:38, Inada Naoki wrote:
> Your case is special.
> You want to create a frozendict which performance is same to builtin dict.
> Builtin dict has special optimization which tightly coupled with
> current CPython implementation.
> So you need to use private APIs for MAINTAIN_
I think it's very boring that, after creating a venv, you have
immediately to do every time:
pip install -U pip
Can't venv have an option for doing this automatically or, better, a
config file where you can put commands that will be launched every
time after you create a venv?
--
https://mail.py
On Tue, Dec 28, 2021 at 4:41 PM Marco Sulla
wrote:
>
> Hi, Inada Senpai. So I do not need PyObject_GC_Track on cloning or
> merging, or MAINTAIN_TRACKING on insert?
>
Your case is special.
You want to create a frozendict which performance is same to builtin dict.
Builtin dict has special optimiza