NoneType List

2022-12-30 Thread Goran Ikac
Happy New Year, everybody! I'm new in the Python List, new in Python world, and new in coding. A few days (weeks?) ago, I faced a problem trying to write a program for an exercise. I asked for help and nobody answered. In the meantime, I found a part of the solution, but a part still remains a myst

Re: set.add() doesn't replace equal element

2022-12-30 Thread Paul Bryan
It seems to me like you have to ideas of what "equal" means. You want to update a "non-equal/equal" value in the set (because of a different time stamp). If you truly considered them equal, the time stamp would be irrelevant and updating the value in the set would be unnecessary. I would: a)

Re: set.add() doesn't replace equal element

2022-12-30 Thread Chris Angelico
On Sat, 31 Dec 2022 at 09:29, Ian Pilcher wrote: > > On 12/30/22 15:47, Paul Bryan wrote: > > What kind of elements are being added to the set? Can you show > > reproducible sample code? > > The objects in question are DHCP leases. I consider them "equal" if > the lease address (or IPv6 prefix) i

Re: set.add() doesn't replace equal element

2022-12-30 Thread Ian Pilcher
On 12/30/22 15:47, Paul Bryan wrote: What kind of elements are being added to the set? Can you show reproducible sample code? The objects in question are DHCP leases. I consider them "equal" if the lease address (or IPv6 prefix) is equal, even if the timestamps have changed. That code is not

Re: help

2022-12-30 Thread Chris Grace
Hello, The mailing list strips all images. We cannot see the error you posted. I'd recommend posting it in text form. What is the script you are running? What do you expect your script to do? On Fri, Dec 30, 2022, 3:14 PM Mor yosef wrote: > Hello guys, > i install python 3.11.1, and i have go

RE: set.add() doesn't replace equal element

2022-12-30 Thread avi.e.gross
Ian, Do you have some examples of things you can put in a set that you consider equal but want to store in the set INSTEAD of any current element? What follows is some thoughts on some methods you could build yourself. Others re possible and someone else may present you with a module that does wh

Re: set.add() doesn't replace equal element

2022-12-30 Thread Chris Angelico
On Sat, 31 Dec 2022 at 08:42, Ian Pilcher wrote: > > I just discovered this behavior, which is problematic for my particular > use. Is there a different set API (or operator) that can be used to > add an element to a set, and replace any equal element? > > If not, am I correct that I should call

Re: set.add() doesn't replace equal element

2022-12-30 Thread Paul Bryan
What kind of elements are being added to the set? Can you show reproducible sample code? On Fri, Dec 30 2022 at 03:41:19 PM -0600, Ian Pilcher wrote: I just discovered this behavior, which is problematic for my particular use. Is there a different set API (or operator) that can be used to a

set.add() doesn't replace equal element

2022-12-30 Thread Ian Pilcher
I just discovered this behavior, which is problematic for my particular use. Is there a different set API (or operator) that can be used to add an element to a set, and replace any equal element? If not, am I correct that I should call set.discard() before calling set.add() to achieve the behavi

Why can't the pointer in a PyCapsule be NULL?

2022-12-30 Thread Robert Latest via Python-list
Hi all, the question is in the subject. I'd like the pointer to be able to be NULL because that would make my code slightly cleaner. No big deal though. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why can't the pointer in a PyCapsule be NULL?

2022-12-30 Thread Robert Latest via Python-list
Stefan Ram wrote: > Robert Latest writes: >>the question is in the subject. I'd like the pointer to be able to be NULL >>because that would make my code slightly cleaner. No big deal though. > > In Usenet, it is considered good style to have all relevant > content in the body. Makes sense. >

help

2022-12-30 Thread Mor yosef
Hello guys, i install python 3.11.1, and i have google chrome so i download the Webdriver Chrome and i just add it on my c:// driver and when i add some script on my desktop i try to run it from the terminal and all the time i receive this error message : maybe you guys can help me with this one? w