Re: Starting using Python

2022-01-04 Thread Dan Stromberg
On Mon, Jan 3, 2022 at 8:06 AM Joao Marques wrote: > Good morning: I have a very simple question: I want to start writing > programs in Python so I went to the Microsoft Store and installed > Python3.9. No problem so far. I would prefer to have a gui interface, an > interface that I can use file-

Re: Why operations between dict views return a set and not a frozenset?

2022-01-04 Thread 2QdxY4RzWzUUiLuE
On 2022-01-05 at 08:30:30 +1100, Cameron Simpson wrote: > On 04Jan2022 21:03, Marco Sulla wrote: > >On Tue, 4 Jan 2022 at 19:38, Chris Angelico wrote: > >> [...] should the keys view be considered > >> frozen or not? Remember the set of keys can change (when the > >> underlying dict changes). >

Re: Shapely Polygon creating empty polygon

2022-01-04 Thread MRAB
On 2022-01-04 22:57, Israel Brewster wrote: I’m running into an issue with shapely that is baffling me. Perhaps someone here can help out? When running shapely directly from a python 3.8 interpreter, it works as expected: import shapely shapely.__version__ '1.8.0' from shapely.geometry imp

Re: Why operations between dict views return a set and not a frozenset?

2022-01-04 Thread Chris Angelico
On Wed, Jan 5, 2022 at 7:04 AM Marco Sulla wrote: > > On Tue, 4 Jan 2022 at 19:38, Chris Angelico wrote: > > [...] should the keys view be considered > > frozen or not? Remember the set of keys can change (when the > > underlying dict changes). > > Well, also the items can change, but they are re

Re: Why operations between dict views return a set and not a frozenset?

2022-01-04 Thread Cameron Simpson
On 04Jan2022 21:03, Marco Sulla wrote: >On Tue, 4 Jan 2022 at 19:38, Chris Angelico wrote: >> [...] should the keys view be considered >> frozen or not? Remember the set of keys can change (when the >> underlying dict changes). > >Well, also the items can change, but they are returned as tuples w

Shapely Polygon creating empty polygon

2022-01-04 Thread Israel Brewster
I’m running into an issue with shapely that is baffling me. Perhaps someone here can help out? When running shapely directly from a python 3.8 interpreter, it works as expected: >>> import shapely >>> shapely.__version__ '1.8.0' >>> from shapely.geometry import Polygon >>> bounds = [-164.296358

Re: Why operations between dict views return a set and not a frozenset?

2022-01-04 Thread Marco Sulla
On Tue, 4 Jan 2022 at 19:38, Chris Angelico wrote: > [...] should the keys view be considered > frozen or not? Remember the set of keys can change (when the > underlying dict changes). Well, also the items can change, but they are returned as tuples with 2 elements. It seems to me that the stdli

Re: Why operations between dict views return a set and not a frozenset?

2022-01-04 Thread Chris Angelico
On Wed, Jan 5, 2022 at 5:29 AM Marco Sulla wrote: > > $ 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 = {1:2} > >>> c = {1:2, 3:4} > >>> c.keys() - a.keys

Why operations between dict views return a set and not a frozenset?

2022-01-04 Thread Marco Sulla
$ 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 = {1:2} >>> c = {1:2, 3:4} >>> c.keys() - a.keys() {3} >>> Why not frozenset({3})? -- https://mail.python.org/ma