Re: how to discover what values produced an exception?

2024-05-06 Thread Chris Angelico via Python-list
On Tue, 7 May 2024 at 03:38, Alan Bawden via Python-list wrote: > A good error message shouldn't withhold any information that can > _easily_ be included. Debugging is more art than science, so there is > no real way to predict what information might prove useful in solving > t

Re: how to discover what values produced an exception?

2024-05-06 Thread Left Right via Python-list
etc.) It's tedious and prone to errors. So, if you really want to do this automatically for every error that's going to be quite a bit of work. On Fri, May 3, 2024 at 6:58 PM Johanne Fairchild via Python-list wrote: > > How to discover what values produced an exception? Or perhaps---why >

Re: how to discover what values produced an exception?

2024-05-06 Thread Alan Bawden via Python-list
Thomas Passin writes: On 5/3/2024 9:56 AM, Johanne Fairchild via Python-list wrote: > How to discover what values produced an exception? Or perhaps---why > doesn't the Python traceback show the values involved in the TypeError? > For instance: &

Re: how to discover what values produced an exception?

2024-05-04 Thread Dan Sommers via Python-list
On 2024-05-03 at 10:56:39 -0300, Johanne Fairchild via Python-list wrote: > How to discover what values produced an exception? Or perhaps---why > doesn't the Python traceback show the values involved in the TypeError? > For instance:

Re: how to discover what values produced an exception?

2024-05-04 Thread Dieter Maurer via Python-list
Johanne Fairchild wrote at 2024-5-3 10:56 -0300: >How to discover what values produced an exception? Or perhaps---why >doesn't the Python traceback show the values involved in the TypeError? >For instance: > >--8<&g

Re: how to discover what values produced an exception?

2024-05-03 Thread Thomas Passin via Python-list
On 5/3/2024 9:56 AM, Johanne Fairchild via Python-list wrote: How to discover what values produced an exception? Or perhaps---why doesn't the Python traceback show the values involved in the TypeError? For instance: --8<>8--- (0,

how to discover what values produced an exception?

2024-05-03 Thread Johanne Fairchild via Python-list
How to discover what values produced an exception? Or perhaps---why doesn't the Python traceback show the values involved in the TypeError? For instance: --8<>8--- >>> (0,0) < 4 Traceback (most recent call last):

CoC Warning [was: What is Install-Paths-To in WHEEL file?]

2024-01-02 Thread Ethan Furman via Python-list
On 12/29/23 05:02, Left Right via Python-list wrote: Wow. That place turned out to be the toxic pit I didn't expect. It's a shame that a public discussion of public goods was entrusted to a bunch of gatekeepers with no sense of responsibility for the thing they keep the keys to. Personal

[dead thread] Re: What is Install-Paths-To in WHEEL file?

2024-01-02 Thread Ethan Furman via Python-list
This thread is no longer being useful, and is now closed. -- ~Ethan~ Moderator -- https://mail.python.org/mailman/listinfo/python-list

Re: What is Install-Paths-To in WHEEL file?

2024-01-01 Thread Left Right via Python-list
> others do not and so your notion of what is "accepted" > is not universally shared. Why should I or anyone else care about what "others" think? The important question is whether what I do is right. And the answer is "yes". That's why there are rules i

Re: What is Install-Paths-To in WHEEL file?

2023-12-30 Thread Oscar Benjamin via Python-list
rested in my opinion but you might want to reflect on the fact that although you consider your behavior to be within "accepted boundaries" the evidence here (and in the forum) suggests that others do not and so your notion of what is "accepted" is not universally shared. I am

Re: What is Install-Paths-To in WHEEL file?

2023-12-30 Thread Left Right via Python-list
thout really understanding who you are > criticising and for what. Your contribution is unhelpful mostly (but > not exclusively) because of the way that you choose to communicate. No, I'm not _wasting_ anyone's time. I bring up a legitimate issue that needs solving. What happens

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Oscar Benjamin via Python-list
On Fri, 29 Dec 2023 at 22:38, Left Right via Python-list wrote: > > > Then your understanding is flat-out wrong. Encouraging participation > > by everyone DOES mean deleting what is unproductive, offensive, and > > likely to discourage participation. > > I haven't wr

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Left Right via Python-list
> Then your understanding is flat-out wrong. Encouraging participation > by everyone DOES mean deleting what is unproductive, offensive, and > likely to discourage participation. I haven't written anything unproductive or offensive. I offered constructive criticism with a detailed pl

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Chris Angelico via Python-list
DOES mean deleting what is unproductive, offensive, and likely to discourage participation. Your entire argument is based on misconceptions. Go play in your own sandbox somewhere, see if you can make something where everyone is welcome, including the toxic AND the people who dislike toxicity

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Left Right via Python-list
Previously you wrote: > Here is the discussion referred to: https://discuss.python.org/t/what-is-install-paths-to-in-wheel-file/42005 This illustrates you had no idea what the discussion was about and now you write: > Oh trust me, I saw the discussion previously. Both cannot b

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Chris Angelico via Python-list
nd I don't believe he / she can give me > rights. What I believe in is that Python is a public good, and its > status is enshrined in the license it uses. Is it? I'm not a lawyer, but I really don't think that that's what the license entitles you to. Can you quote the relevant parts of it

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Left Right via Python-list
> Yeah, because you have the God-given RIGHT to be able to say anything > you like, on anyone's web site, and nobody's allowed to delete > anything you say! That's how it goes, right? I don't believe in god, and I don't believe he / she can give me rights. What I believe in is th

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Chris Angelico via Python-list
On Sat, 30 Dec 2023 at 01:16, Left Right via Python-list wrote: > > That's not the discussion that was toxic. But the one that was -- > doesn't exist anymore since the forum owners deleted it. > > The part where the forum owners delete whatever they disagree with is > the toxic part. Yeah,

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Left Right via Python-list
ponsibility for the thing > > they keep the keys to. > > Here is the discussion referred to: > https://discuss.python.org/t/what-is-install-paths-to-in-wheel-file/42005 > > I don't see anything "toxic" in that discussion. You asked questions > and people took the time to

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Oscar Benjamin via Python-list
ing > they keep the keys to. Here is the discussion referred to: https://discuss.python.org/t/what-is-install-paths-to-in-wheel-file/42005 I don't see anything "toxic" in that discussion. You asked questions and people took the time to give clear answers. The basic answer to your questi

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Left Right via Python-list
Wow. That place turned out to be the toxic pit I didn't expect. It's a shame that a public discussion of public goods was entrusted to a bunch of gatekeepers with no sense of responsibility for the thing they keep the keys to. On Wed, Dec 27, 2023 at 9:49 PM Left Right wrote: > > Thanks. I

Re: What is Install-Paths-To in WHEEL file?

2023-12-27 Thread Left Right via Python-list
Thanks. I tried asking there. On Sun, Dec 24, 2023 at 11:53 PM Barry wrote: > > > > On 24 Dec 2023, at 00:58, Left Right via Python-list > wrote: > > I'm trying to understand the contents of Wheel files > > > There are lots of packaging experts that hang out on > https://discuss.python.org/

Re: What is Install-Paths-To in WHEEL file?

2023-12-24 Thread Barry via Python-list
> On 24 Dec 2023, at 00:58, Left Right via Python-list > wrote: > > I'm trying to understand the contents of Wheel files There are lots of packaging experts that hang out on https://discuss.python.org/ you are likely to get a response there if not here replies. Barry --

Re: What is Install-Paths-To in WHEEL file?

2023-12-23 Thread Left Right via Python-list
Sorry, I found that this... documentation continues, but it doesn't make anything better. Here's what this PEP has to add (text in square brackets are my questions): If a package needs to find its files at runtime, it can request they be written to a specified file or files [does this mean

What is Install-Paths-To in WHEEL file?

2023-12-23 Thread Left Right via Python-list
sh" would write this file as "/bin/bash" -- that cannot be right, or is it? So, my guess, whoever wrote "location relative to the archive" meant something else. But what? What was this feature trying to accomplish? The whole passage makes no sense... Why would anyone w

Re: What sort of exception when a class can't find something?

2023-08-31 Thread Chris Green via Python-list
Several helpful replies, thank you all. -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list

Re: What sort of exception when a class can't find something?

2023-08-31 Thread Chris Angelico via Python-list
On Fri, 1 Sept 2023 at 06:39, Chris Green via Python-list wrote: > > What sort of exception should a class raise in __init__() when it > can't find an appropriate set of data for the parameter passed in to > the class instantiation? > > E.g. I have a database with some

Re: What sort of exception when a class can't find something?

2023-08-31 Thread Peter J. Holzer via Python-list
On 2023-08-31 21:32:04 +0100, Chris Green via Python-list wrote: > What sort of exception should a class raise in __init__() when it > can't find an appropriate set of data for the parameter passed in to > the class instantiation? > > E.g. I have a database with some names and addr

What sort of exception when a class can't find something?

2023-08-31 Thread Chris Green via Python-list
What sort of exception should a class raise in __init__() when it can't find an appropriate set of data for the parameter passed in to the class instantiation? E.g. I have a database with some names and address in and have a class Person that gets all the details for a person given their name

Re: What is this TEST BANK stuff ?

2023-07-06 Thread Chris Angelico via Python-list
an explaination; ( and it woudl have to > > be a good one ); what is the purpsoe of this, why is it here ? > > > > Can it be eliminated ? > > > > Regards, > > Dan > > tl;dr It would be difficult to without changing the group to be > moderated. I am ve

Re: What is this TEST BANK stuff ?

2023-07-06 Thread a a via Python-list
On Wednesday, 21 June 2023 at 15:38:00 UTC+2, Dan Kolis wrote: > Why do we tolerate this spam ? > > this seems most likely a way to inject viruses into people's workflow. > > That wiped out usenet. Ahh without an explaination; ( and it woudl have to be > a good one ); w

Re: What is this TEST BANK stuff ?

2023-07-06 Thread neopolitan via Python-list
On 6/21/23 08:37, Dan Kolis wrote: Why do we tolerate this spam ? this seems most likely a way to inject viruses into people's workflow. That wiped out usenet. Ahh without an explaination; ( and it woudl have to be a good one ); what is the purpsoe of this, why is it here ? Can

Re: What is this TEST BANK stuff ?

2023-06-21 Thread Grant Edwards via Python-list
ed out usenet. Ahh without an explaination; ( and it woudl have to >> be a good one ); what is the purpsoe of this, why is it here ? >> >> Can it be eliminated ? >> > > Yes, follow the mailing list instead of the newsgroup. Most spam > doesn't reach us over here at the l

Re: What is this TEST BANK stuff ?

2023-06-21 Thread Chris Angelico via Python-list
On Thu, 22 Jun 2023 at 02:54, Dan Kolis via Python-list wrote: > > Why do we tolerate this spam ? > > this seems most likely a way to inject viruses into people's workflow. > > That wiped out usenet. Ahh without an explaination; ( and it woudl have to be > a good one )

What is this TEST BANK stuff ?

2023-06-21 Thread Dan Kolis via Python-list
Why do we tolerate this spam ? this seems most likely a way to inject viruses into people's workflow. That wiped out usenet. Ahh without an explaination; ( and it woudl have to be a good one ); what is the purpsoe of this, why is it here ? Can it be eliminated ? Regards, Dan -- https

Re: What to use instead of nntplib?

2023-05-30 Thread Greg Ewing via Python-list
sit around for YEARS, and when someone says "this sucks, this is broken and could be better", and the githubian response is typically a dismissive "Nothing is stopping you from making a PR". Also, "nothing is stopping you from making a fork." Which is what you

Re: What to use instead of nntplib?

2023-05-30 Thread aapost
I used to run my own mail server. Now I don't. Practicality beats purity. To be quite frank, the moralistic approach of complaining about the way other people are too happy to give control to big companies is NEVER going to achieve anything. You're welcome to be a little island, that one

Re: What to use instead of nntplib?

2023-05-30 Thread Mats Wichmann
On 5/22/23 17:59, Grant Edwards wrote: On 2023-05-22, Keith Thompson wrote: My understanding is that nntplib isn't being erased from reality, it's merely being removed from the set of modules that are provided by default. I presume that once it's removed from the core, it will still be

Re: What to use instead of nntplib?

2023-05-30 Thread aapost
implementations floating around, but how do you even consider which one to use? Without some energy behind it, to be certain in what you are doing, each person will practically have to download Python3.11 and extract it themselves, and then either add it in to the latest version themselves, or

Re: What to use instead of nntplib?

2023-05-22 Thread Jon Ribbens via Python-list
On 2023-05-22, Skip Montanaro wrote: >> My understanding is that nntplib isn't being erased from reality, >> it's merely being removed from the set of modules that are provided >> by default. >> >> I presume that once it's removed from the core, it will still be >> possible to install it via pip

Re: What to use instead of nntplib?

2023-05-22 Thread Grant Edwards
On 2023-05-22, Keith Thompson wrote: > My understanding is that nntplib isn't being erased from reality, > it's merely being removed from the set of modules that are provided > by default. > > I presume that once it's removed from the core, it will still be > possible to install it via pip or

Re: What to use instead of nntplib?

2023-05-22 Thread Skip Montanaro
> > My understanding is that nntplib isn't being erased from reality, > it's merely being removed from the set of modules that are provided > by default. > > I presume that once it's removed from the core, it will still be > possible to install it via pip or some other mechanism. > It won't

Re: What to use instead of nntplib?

2023-05-22 Thread Keith Thompson
Grant Edwards writes: > On 2023-05-21, Retrograde wrote: >> Who ever came up with "Removing dead batteries" as a slogan, when >> some of those batteries still work perfectly well, needs to rethink >> it. Go ahead and remove code that no longer works, OK. But removing >> unpopular modules? That

Re: What to use instead of nntplib?

2023-05-22 Thread Grant Edwards
On 2023-05-21, Retrograde wrote: > Who ever came up with "Removing dead batteries" as a slogan, when > some of those batteries still work perfectly well, needs to rethink > it. Go ahead and remove code that no longer works, OK. But removing > unpopular modules? That undercuts the entire

Re: What to use instead of nntplib?

2023-05-22 Thread Retrograde
> >> See PEP 594: https://peps.python.org/pep-0594/ > > > > Thanks Cameron. > > A scary list; I must have a dozen projects from the late 90s still > > live that are using many of these! I'm glad I'm retired and won't > > be the one who has to fix 'em :-) > > It has been pointed out to me that

Re: What to use instead of nntplib?

2023-05-19 Thread Retrograde
ists. Using an MUA (even combined with something like > procmail) and folders/labels is just a pale imitation of a good > newsreader. > > > Usenet news is still very much alive though a minority interest now > > I suspect. > > This list's decision to stop accepting postings via

Re: What to use instead of nntplib?

2023-05-16 Thread Grant Edwards
On 2023-05-16, Chris Green wrote: > Grizzy Adams wrote: >> Tuesday, May 16, 2023 at 9:26, Alan Gauld wrote: >> Re: What to use instead of nntplib? (at least in part) >> >> >On 15/05/2023 22:11, Grant Edwards wrote: >> >> I got a nice warnin

Re: What to use instead of nntplib?

2023-05-16 Thread Chris Green
Grizzy Adams wrote: > Tuesday, May 16, 2023 at 9:26, Alan Gauld wrote: > Re: What to use instead of nntplib? (at least in part) > > >On 15/05/2023 22:11, Grant Edwards wrote: > >> I got a nice warning today from the inews utility I use daily: > >> >

Re: What to use instead of nntplib?

2023-05-16 Thread Grant Edwards
On 2023-05-16, Alan Gauld wrote: > On 16/05/2023 10:06, Cameron Simpson wrote: > >>> I'm curious as to why nntplib is deprecated? Surely there are still a >>> lot of nntp servers around, both inside and outside corporate firewalls? Anything not used to develop AI is going to be depricated. An AI

Re: What to use instead of nntplib?

2023-05-16 Thread Mats Wichmann
On 5/15/23 20:12, Grant Edwards wrote: On 2023-05-15, Skip Montanaro wrote: I got a nice warning today from the inews utility I use daily: DeprecationWarning: 'nntplib' is deprecated and slated for removal in Python 3.13 What should I use in place of nntplib? I'd recommend

Re: What to use instead of nntplib?

2023-05-16 Thread Alan Gauld
On 16/05/2023 10:06, Cameron Simpson wrote: >> I'm curious as to why nntplib is deprecated? Surely there are still a >> lot of nntp servers around, both inside and outside corporate firewalls? >> Is there a problem with the module or is it just perceived as no longer >> required? > > See PEP

Re: What to use instead of nntplib?

2023-05-16 Thread Grizzy Adams via Python-list
Tuesday, May 16, 2023 at 9:26, Alan Gauld wrote: Re: What to use instead of nntplib? (at least in part) >On 15/05/2023 22:11, Grant Edwards wrote: >> I got a nice warning today from the inews utility I use daily: >> >> DeprecationWarning: 'nntplib' is deprecated a

Re: What to use instead of nntplib?

2023-05-16 Thread Cameron Simpson
On 16May2023 09:26, Alan Gauld wrote: On 15/05/2023 22:11, Grant Edwards wrote: I got a nice warning today from the inews utility I use daily: DeprecationWarning: 'nntplib' is deprecated and slated for removal in Python 3.13 What should I use in place of nntplib? I'm curious as to why

Re: What to use instead of nntplib?

2023-05-16 Thread Alan Gauld
On 15/05/2023 22:11, Grant Edwards wrote: > I got a nice warning today from the inews utility I use daily: > > DeprecationWarning: 'nntplib' is deprecated and slated for removal in > Python 3.13 > > What should I use in place of nntplib? I'm curious as to why nntplib is

Re: What to use instead of nntplib?

2023-05-15 Thread Grant Edwards
On 2023-05-15, Skip Montanaro wrote: >> I got a nice warning today from the inews utility I use daily: >> >> DeprecationWarning: 'nntplib' is deprecated and slated for >> removal in Python 3.13 >> >> What should I use in place of nntplib? >

Re: What to use instead of nntplib?

2023-05-15 Thread Skip Montanaro
> I got a nice warning today from the inews utility I use daily: > > DeprecationWarning: 'nntplib' is deprecated and slated for removal in > Python 3.13 > > What should I use in place of nntplib? I'd recommend creating a PyPI project with the existing 3.12 code, then us

What to use instead of nntplib?

2023-05-15 Thread Grant Edwards
I got a nice warning today from the inews utility I use daily: DeprecationWarning: 'nntplib' is deprecated and slated for removal in Python 3.13 What should I use in place of nntplib? -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Re: What do these '=?utf-8?' sequences mean in python?

2023-05-09 Thread Cameron Simpson
On 08May2023 12:19, jak wrote: In reality you should also take into account the fact that if the header contains a 'b' instead of a 'q' as a penultimate character, then the rest of the package is converted on the basis64 "=?utf-8?Q?" --> "=?utf-8?B?" Aye. Specification:

Re: What do these '=?utf-8?' sequences mean in python?

2023-05-08 Thread Dieter Maurer
Chris Green wrote at 2023-5-6 15:58 +0100: >Chris Green wrote: >> I'm having a real hard time trying to do anything to a string (?) >> returned by mailbox.MaildirMessage.get(). >> >What a twit I am :-) > >Strings are immutable, I have to do:- > &

Re: What do these '=?utf-8?' sequences mean in python?

2023-05-08 Thread Keith Thompson
Chris Green writes: > Chris Green wrote: >> I'm having a real hard time trying to do anything to a string (?) >> returned by mailbox.MaildirMessage.get(). >> > What a twit I am :-) > > Strings are immutable, I have to do:- > > newstring = olds

Re: What do these '=?utf-8?' sequences mean in python?

2023-05-08 Thread jak
Peter Pearson ha scritto: On Sat, 6 May 2023 14:50:40 +0100, Chris Green wrote: [snip] So, what do those =?utf-8? and ?= sequences mean? Are they part of the string or are they wrapped around the string on output as a way to show that it's utf-8 encoded? Yes, "=?utf-8?" signals &q

Re: What do these '=?utf-8?' sequences mean in python?

2023-05-08 Thread Peter Pearson
On Sat, 6 May 2023 14:50:40 +0100, Chris Green wrote: [snip] > So, what do those =?utf-8? and ?= sequences mean? Are they part of > the string or are they wrapped around the string on output as a way to > show that it's utf-8 encoded? Yes, "=?utf-8?" signals "MIME head

Re: What do these '=?utf-8?' sequences mean in python?

2023-05-08 Thread jak
Chris Green ha scritto: Keith Thompson wrote: Chris Green writes: Chris Green wrote: I'm having a real hard time trying to do anything to a string (?) returned by mailbox.MaildirMessage.get(). What a twit I am :-) Strings are immutable, I have to do:- newstring = oldstring.replace

What do these '=?utf-8?' sequences mean in python?

2023-05-08 Thread Chris Green
I'm having a real hard time trying to do anything to a string (?) returned by mailbox.MaildirMessage.get(). I'm extracting the Subject: header from a message and, if I write what it returns to a log file using the python logging module what I see in the log file (when the Subject: has non-ASCII

Re: What do these '=?utf-8?' sequences mean in python?

2023-05-08 Thread Chris Green
Keith Thompson wrote: > Chris Green writes: > > Chris Green wrote: > >> I'm having a real hard time trying to do anything to a string (?) > >> returned by mailbox.MaildirMessage.get(). > >> > > What a twit I am :-) > > > > Strin

Re: What do these '=?utf-8?' sequences mean in python?

2023-05-08 Thread Chris Green
Chris Green wrote: > I'm having a real hard time trying to do anything to a string (?) > returned by mailbox.MaildirMessage.get(). > What a twit I am :-) Strings are immutable, I have to do:- newstring = oldstring.replace("_", " ") Job done! -- Chris Green

Re: What kind of "thread safe" are deque's actually?

2023-03-29 Thread Chris Angelico
On Thu, 30 Mar 2023 at 07:36, Greg Ewing via Python-list wrote: > > On 30/03/23 6:13 am, Chris Angelico wrote: > > I'm not sure what would happen in > > a GIL-free world but most likely the lock on the input object would > > still ensure thread safety. > > In a GIL-

Re: What kind of "thread safe" are deque's actually?

2023-03-29 Thread Greg Ewing via Python-list
On 30/03/23 6:13 am, Chris Angelico wrote: I'm not sure what would happen in a GIL-free world but most likely the lock on the input object would still ensure thread safety. In a GIL-free world, I would not expect deque to hold a lock the entire time that something was iterating over

Re: What kind of "thread safe" are deque's actually?

2023-03-29 Thread Jack Dangler
up when I switched from running a statistics.mean() on one of these, instead of what I had been using, a statistics.median(). Apparently the kind of iteration done in a mean, is more conflict prone than a median? It may be a matter of whether the GIL is held or not. I had a look at the source

Re: What kind of "thread safe" are deque's actually?

2023-03-29 Thread Dennis Lee Bieber
On Wed, 29 Mar 2023 10:50:49 -0400, Jack Dangler declaimed the following: >Sorry for any injected confusion here, but that line "data = >sorted(data)" appears as though it takes the value of the variable named >_data_, sorts it and returns it to the same variable store, so no copy >would be

Re: What kind of "thread safe" are deque's actually?

2023-03-29 Thread Chris Angelico
ly started showing up when I switched from > >>> running a statistics.mean() on one of these, instead of what I had been > >>> using, a statistics.median(). Apparently the kind of iteration done in a > >>> mean, is more conflict prone than a median? > >>

Re: What kind of "thread safe" are deque's actually?

2023-03-29 Thread Grant Edwards
able store, so no copy > would be created. Am I missing something there? Yes, you're missing the basics of what an assignment does in Python and how objects work. Python doesn't have such a thing as "a variable st store". The assignment operator binds a name to an object. The 'sorted(data)

Re: What kind of "thread safe" are deque's actually?

2023-03-29 Thread Jack Dangler
On 3/29/23 02:08, Chris Angelico wrote: On Wed, 29 Mar 2023 at 16:56, Greg Ewing via Python-list wrote: On 28/03/23 2:25 pm, Travis Griggs wrote: Interestingly the error also only started showing up when I switched from running a statistics.mean() on one of these, instead of what I had

Re: What kind of "thread safe" are deque's actually?

2023-03-29 Thread Chris Angelico
On Wed, 29 Mar 2023 at 16:56, Greg Ewing via Python-list wrote: > > On 28/03/23 2:25 pm, Travis Griggs wrote: > > Interestingly the error also only started showing up when I switched from > > running a statistics.mean() on one of these, instead of what I had been > > us

Re: What kind of "thread safe" are deque's actually?

2023-03-28 Thread Greg Ewing via Python-list
On 28/03/23 2:25 pm, Travis Griggs wrote: Interestingly the error also only started showing up when I switched from running a statistics.mean() on one of these, instead of what I had been using, a statistics.median(). Apparently the kind of iteration done in a mean, is more conflict prone

Re: What kind of "thread safe" are deque's actually?

2023-03-27 Thread 2QdxY4RzWzUUiLuE
On 2023-03-27 at 18:25:01 -0700, Travis Griggs wrote: > "Deques support thread-safe, memory efficient appends and pops from > either side of the deque with approximately the same O(1) performance > in either direction.” >

Re: What kind of "thread safe" are deque's actually?

2023-03-27 Thread Grant Edwards
On 2023-03-28, Travis Griggs wrote: > A while ago I chose to use a deque that is shared between two threads. I did > so because the docs say: > > "Deques support thread-safe, memory efficient appends and pops from > either side of the deque with approximately the same O(1) > performance in

Re: What kind of "thread safe" are deque's actually?

2023-03-27 Thread Chris Angelico
ontinuing to iterate. That MAY be a result of threading, but it isn't necessarily. For threaded usage, I would recommend restricting yourself to append/appendleft/pop/popleft (the standard mutators), with any operations on the entire queue being done on a copy instead (either q.copy() or list(q) d

What kind of "thread safe" are deque's actually?

2023-03-27 Thread Travis Griggs
ingly the error also only started showing up when I switched from running a statistics.mean() on one of these, instead of what I had been using, a statistics.median(). Apparently the kind of iteration done in a mean, is more conflict prone than a median? I’ve got a couple ways I can work a

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-25 Thread Weatherby,Gerard
of Peter J. Holzer Date: Saturday, February 25, 2023 at 5:21 PM To: python-list@python.org Subject: Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ? On 2023-02-25 21:58:18 +, Weatherby,Gerard wrote: > I only use asserts for things I know to be true. Yeah, tha

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-25 Thread Peter J. Holzer
On 2023-02-25 21:58:18 +, Weatherby,Gerard wrote: > I only use asserts for things I know to be true. Yeah, that's what assers are for. Or rather for things that you *think* are true. > In other words, a failing assert means I have a hole in my program > logic. Yes, if you inc

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-25 Thread Weatherby,Gerard
, February 25, 2023 at 9:22 AM To: python-list@python.org Subject: Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ? On 2023-02-25 09:10:06 -0500, Thomas Passin wrote: > On 2/25/2023 1:13 AM, Peter J. Holzer wrote: > > On 2023-02-24 18:19:52 -0500, Thomas Pas

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-25 Thread Peter J. Holzer
On 2023-02-25 09:10:06 -0500, Thomas Passin wrote: > On 2/25/2023 1:13 AM, Peter J. Holzer wrote: > > On 2023-02-24 18:19:52 -0500, Thomas Passin wrote: > > > Sometimes you can use a second parameter to assert if you know what kind > > > of > > > error to

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-25 Thread Thomas Passin
appropriate. Curiously, this does not even occur during an assert exception - despite the value/relationship being the whole point of using the command! x = 1 assert x == 2 AssertionError (and that's it) Sometimes you can use a second parameter to assert if you know what kind of error

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-24 Thread Peter J. Holzer
t x == 2 > > > > > > > > AssertionError (and that's it) > > Sometimes you can use a second parameter to assert if you know what kind of > error to expect: > > >>> a = [1,2,3] > >>> b = [4,5] > >>> assert len(a) == len(b), f'len

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-24 Thread Thomas Passin
/relationship being the whole point of using the command! x = 1 assert x == 2 AssertionError (and that's it) Sometimes you can use a second parameter to assert if you know what kind of error to expect: >>> a = [1,2,3] >>> b = [4,5] >>> assert len(a) == len(b)

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-24 Thread Peter J. Holzer
On 2023-02-25 08:47:00 +1300, dn via Python-list wrote: > That said, have observed coders 'graduating' from other languages, making > wider use of assert - assumed to be more data (value) sanity-checks than > typing, but ... > > Do you use assert frequently? Not very often, but I do use it.

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-24 Thread dn via Python-list
the more-strictured (if not more-structured) languages of my past, to Python - particularly the different philosophies or emphases of what happens at 'compile-time' cf 'execution-time'; and how such required marked changes in attitudes to design, time-allocation, work-flow, and tool-set. Tw

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-24 Thread Peter J. Holzer
On 2023-02-24 16:12:10 +1300, dn via Python-list wrote: > In some ways, providing this information seems appropriate. Curiously, this > does not even occur during an assert exception - despite the > value/relationship being the whole point of using the command! > > x = 1 > assert x == 2 >

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-24 Thread Peter J. Holzer
On 2023-02-23 20:32:26 -0700, Michael Torrie wrote: > On 2/23/23 01:08, Hen Hanna wrote: > > Python VM is seeing an "int" object (123) (and telling me that) > > ... so it should be easy to print that "int" object What does > > Python VMknow

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-24 Thread Peter J. Holzer
r: can only concatenate str (not "int") to str > > > > > > Why doesn't Python (error msg) do the obvious thing and tell me > > WHAT the actual (offending, arg) values are ? > > > > In many cases, it'd help to know what string the var A had , when t

RE: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-23 Thread avi.e.gross
We have been supplying many possible reasons or consequences for why the implementation of python does not do what the OP wants and even DEMANDS. I am satisfied with knowing it was because they CHOSE NOT TO in some places and maybe not in others. It is nice to see some possible reasons

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-23 Thread Michael Torrie
On 2/23/23 01:08, Hen Hanna wrote: > Python VM is seeing an "int" object (123) (and telling me that) ... > so it should be easy to print that "int" object > What does Python VMknow ? and when does it know it ? It knows there is an object and its name

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-23 Thread dn via Python-list
Python (error msg) do the obvious thing and tell me WHAT the actual (offending, arg) values are ? In many cases, it'd help to know what string the var A had , when the error occurred. i wouldn't have to put print(a) just above,

RE: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-23 Thread avi.e.gross
Rob, There are lots of nifty features each of us might like and insist make much more sense than what others say they want. Sometimes the answer is to not satisfy most of those demands but provide TOOLS they can use to do things for themselves. As you agree, many of us have found all kinds

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-23 Thread Rob Cliffe via Python-list
On 22/02/2023 20:05, Hen Hanna wrote: Python makes programming (debugging) so easy I agree with that! Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-23 Thread Hen Hanna
na wrote: > >>>> py bug.py > >>> Traceback (most recent call last): > >>> File "C:\Usenet\bug.py", line 5, in > >>> print( a + 12 ) > >>> TypeError: can only concatenate str (not "int") to str > >>> &

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-23 Thread Barry
>>> File "C:\Usenet\bug.py", line 5, in >>> print( a + 12 ) >>> TypeError: can only concatenate str (not "int") to str >>> >>> >>> Why doesn't Python (error msg) do the obvious thing and tell me >>> WHAT the act

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-22 Thread Hen Hanna
print( a + 12 ) > > TypeError: can only concatenate str (not "int") to str > > > > > > Why doesn't Python (error msg) do the obvious thing and tell me > > WHAT the actual (offending, arg) values are ? > > > > In many cases, it'd help to know what s

  1   2   3   4   5   6   7   8   9   10   >