On Tue, Nov 30, 2021 at 12:41 PM Richard Damon wrote:
>
> On 11/29/21 5:01 PM, Chris Angelico wrote:
> > On Tue, Nov 30, 2021 at 8:55 AM Marco Sulla
> > wrote:
> >> I must say that I'm reading the documentation now, and it's a bit
> >> confusing. In the docs, inplace operators as |= should not wo
On 11/29/21 5:01 PM, Chris Angelico wrote:
On Tue, Nov 30, 2021 at 8:55 AM Marco Sulla
wrote:
I must say that I'm reading the documentation now, and it's a bit
confusing. In the docs, inplace operators as |= should not work. They
are listed under the set-only functions and operators. But, as we
On Tue, Nov 30, 2021 at 8:55 AM Marco Sulla
wrote:
>
> I must say that I'm reading the documentation now, and it's a bit
> confusing. In the docs, inplace operators as |= should not work. They
> are listed under the set-only functions and operators. But, as we saw,
> this is not completely true: t
I must say that I'm reading the documentation now, and it's a bit
confusing. In the docs, inplace operators as |= should not work. They
are listed under the set-only functions and operators. But, as we saw,
this is not completely true: they work but they don't mutate the
original object. The same f
Yes, and you do this regularly. Indeed integers, for example, are immutables and
a = 0
a += 1
is something you do dozens of times, and you simply don't think that
another object is created and substituted for the variable named `a`.
On Mon, 22 Nov 2021 at 14:59, Chris Angelico wrote:
>
> On Tue
On Tue, Nov 23, 2021 at 12:52 AM David Raymond wrote:
> It is a little confusing since the docs list this in a section that says they
> don't apply to frozensets, and lists the two versions next to each other as
> the same thing.
>
> https://docs.python.org/3.9/library/stdtypes.html#set-types-se
>> (venv_3_10) marco@buzz:~$ python
>> Python 3.10.0 (heads/3.10-dirty:f6e8b80d20, Nov 18 2021, 19:16:18)
>> [GCC 10.1.1 20200718] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> a = frozenset((3, 4))
>> >>> a
>> frozenset({3, 4})
>> >>> a |= {5,}
>> >>> a
Marco Sulla 在 2021年11月20日 星期六上午5:12:19 [UTC+8] 的信中寫道:
> (venv_3_10) marco@buzz:~$ python
> Python 3.10.0 (heads/3.10-dirty:f6e8b80d20, Nov 18 2021, 19:16:18)
> [GCC 10.1.1 20200718] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> a = frozenset((3, 4))
>
On 2021-11-19 21:11, Marco Sulla wrote:
(venv_3_10) marco@buzz:~$ python
Python 3.10.0 (heads/3.10-dirty:f6e8b80d20, Nov 18 2021, 19:16:18)
[GCC 10.1.1 20200718] on linux
Type "help", "copyright", "credits" or "license" for more information.
a = frozenset((3, 4))
a
frozenset({3, 4})
a |= {5,}
Mh. Now I'm thinking that I've done
a = "Marco "
a += "Sulla"
many times without bothering.
On Fri, 19 Nov 2021 at 22:22, Chris Angelico wrote:
>
> On Sat, Nov 20, 2021 at 8:16 AM Chris Angelico wrote:
> >
> > On Sat, Nov 20, 2021 at 8:13 AM Marco Sulla
> > wrote:
> > >
> > > (venv_3_10) marc
On Sat, Nov 20, 2021 at 8:16 AM Chris Angelico wrote:
>
> On Sat, Nov 20, 2021 at 8:13 AM Marco Sulla
> wrote:
> >
> > (venv_3_10) marco@buzz:~$ python
> > Python 3.10.0 (heads/3.10-dirty:f6e8b80d20, Nov 18 2021, 19:16:18)
> > [GCC 10.1.1 20200718] on linux
> > Type "help", "copyright", "credits"
On Sat, Nov 20, 2021 at 8:13 AM Marco Sulla
wrote:
>
> (venv_3_10) marco@buzz:~$ python
> Python 3.10.0 (heads/3.10-dirty:f6e8b80d20, Nov 18 2021, 19:16:18)
> [GCC 10.1.1 20200718] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> a = frozenset((3, 4))
> >>> a
(venv_3_10) marco@buzz:~$ python
Python 3.10.0 (heads/3.10-dirty:f6e8b80d20, Nov 18 2021, 19:16:18)
[GCC 10.1.1 20200718] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = frozenset((3, 4))
>>> a
frozenset({3, 4})
>>> a |= {5,}
>>> a
frozenset({3, 4, 5})
--
ht
13 matches
Mail list logo