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
>I can help you narrow it down a bit. The problem actually occurs inside
>this function call somehow. You can verify this by doing this:
>
>
>fig,axes = plt.subplots(2,1, figsize=(20, 15))
>
>print ("axes[0].get_figure()=",axes[0].get_figure())
>
>You'll find that get_figure() is returning None, wh
On 11/22/21 2:03 AM, Mahmood Naderan via Python-list wrote:
> Hi
>
> I asked a question some days ago, but due to the lack of minimal
> producing code, the topic got a bit messy. So, I have decided to ask
> it in a new topic with a clear minimum code.
> import pandas as pd
> import csv,sys
> impor
Le 22/11/2021 à 16:02, Jon Ribbens a écrit :
On 2021-11-22, ast wrote:
For immutable types, copy(foo) just returns foo.
ok, thx
--
https://mail.python.org/mailman/listinfo/python-list
On 2021-11-22, ast wrote:
> Hi,
>
> >>> a = 6
> >>> b = 6
> >>> a is b
> True
>
> ok, we all know that Python creates a sole instance
> with small integers, but:
>
> >>> import copy
> >>> b = copy.copy(a)
> >>> a is b
> True
>
> I was expecting False
Why did you expect False?
For immutable types
Hi,
>>> a = 6
>>> b = 6
>>> a is b
True
ok, we all know that Python creates a sole instance
with small integers, but:
>>> import copy
>>> b = copy.copy(a)
>>> a is b
True
I was expecting False
--
https://mail.python.org/mailman/listinfo/python-list
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
Hi
I asked a question some days ago, but due to the lack of minimal producing
code, the topic got a bit messy. So, I have decided to ask it in a new topic
with a clear minimum code.
With Pandas 1.2.3 and Matplotlib 3.3.4, the following plot() functions returns
error and I don't know what is wr