Re: Python/New/Learn

2022-05-06 Thread o1bigtenor
As we're now discussing tutorial methods - - - - On Thu, May 5, 2022 at 8:57 PM Chris Angelico wrote: > > On Fri, 6 May 2022 at 09:53, Grant Edwards wrote: > > > > On 2022-05-05, Mats Wichmann wrote: > > > > > Without having any data at all on it, just my impressions, more > > > people these da

Do projects exist to audit PyPI-hosted packages?

2022-05-06 Thread Skip Montanaro
I woke with a start in what amounted to the middle of the night (I really need to get about three more hours of sleep, but you'll understand why I was awake to write this). Many years ago, so as to preserve my wrists, I wrote a tool

Re: Python/New/Learn

2022-05-06 Thread 2QdxY4RzWzUUiLuE
On 2022-05-05 at 16:51:49 -0700, Grant Edwards wrote: > On 2022-05-05, Mats Wichmann wrote: > > > Without having any data at all on it, just my impressions, more > > people these days learn from in-person or video experiences. > > I've always been utterly baffled by video tutorials for > progr

Fwd: Do projects exist to audit PyPI-hosted packages?

2022-05-06 Thread Sam Ezeh
-- Forwarded message - From: Sam Ezeh Date: Fri, 6 May 2022, 15:29 Subject: Re: Do projects exist to audit PyPI-hosted packages? To: Skip Montanaro I've had similar thoughts in the past. I don't know of anything but I wonder if repositiories for other languages might have someth

Re: Python/New/Learn

2022-05-06 Thread Avi Gross via Python-list
This topic has rapidly shifted over way beyond Python even as the original  person has not returned to participate. There are many ways to teach anything and since the classical method was to learn in person from someone using mainly sound or pantomime, it has hung on. Even with the existence of

Seeking deeper understanding of python equality (==)

2022-05-06 Thread Jonathan Kaczynski
Hi, I was recently trying to explain how python equality works and ran into a gap in my knowledge. I haven't found any good pages going beneath a surface level explanation of python equality comparison. I'll post my investigations below. What I think I'm looking for is where in the source code (h

Re: Instatiating module / Reusing module of command-line tool

2022-05-06 Thread Loris Bennett
r...@zedat.fu-berlin.de (Stefan Ram) writes: > "Loris Bennett" writes: >>My question: What is the analogue to initialising an object via the >>constructor for a module? > > If you need a class, you can write a class. > > When one imports a module, the module actually gets executed. > That's

Re: Seeking deeper understanding of python equality (==)

2022-05-06 Thread Sam Ezeh
Perhaps these source references are useful: Python/ceval.c (_PyEval_EvalFrameDefault) https://github.com/python/cpython/blob/main/Python/ceval.c#L3754-L3768 Objects/object.c (do_richcompare) https://github.com/python/cpython/blob/42fee931d055a3ef8ed31abe44603b9b2856e04d/Objects/object.c#L661-L713

Re: Do projects exist to audit PyPI-hosted packages?

2022-05-06 Thread Skip Montanaro
> > A related problem is that even if a package is maintained by somebody with > good intentions, the account might be hijacked by a malicious actor and > since PyPi is separate from source control, people might not be able to > find out easily and malware could spread through PyPi. > I hadn't con

Re: Fwd: Do projects exist to audit PyPI-hosted packages?

2022-05-06 Thread Mats Wichmann
On 5/6/22 09:24, Sam Ezeh wrote: > -- Forwarded message - > From: Sam Ezeh > Date: Fri, 6 May 2022, 15:29 > Subject: Re: Do projects exist to audit PyPI-hosted packages? > To: Skip Montanaro > > > I've had similar thoughts in the past. I don't know of anything but I > wonder if

pandas (in jupyter?) problem

2022-05-06 Thread Paulo da Silva
Hi all! I'm having the following problem. Consider the code (the commented or the not commented which I think do the same things): #for col in missing_cols: #df[col] = np.nan df=df.copy() df[missing_cols]=np.nan df has about 2 cols and len(missing_cols) is about 18000. I'm getting l

Re: tail

2022-05-06 Thread Marco Sulla
I have a little problem. I tried to extend the tail function, so it can read lines from the bottom of a file object opened in text mode. The problem is it does not work. It gets a starting position that is lower than the expected by 3 characters. So the first line is read only for 2 chars, and th

Re: tail

2022-05-06 Thread MRAB
On 2022-05-06 20:21, Marco Sulla wrote: I have a little problem. I tried to extend the tail function, so it can read lines from the bottom of a file object opened in text mode. The problem is it does not work. It gets a starting position that is lower than the expected by 3 characters. So the f

Re: Python/New/Learn

2022-05-06 Thread dn
To the OP: there are many MOOCs available on the likes of the Coursera and edX platform. (rationale, below) Disclaimer: I work on courses on the edX platform (but not Python). On 06/05/2022 23.37, o1bigtenor wrote: > As we're now discussing tutorial methods - - - - > > On Thu, May 5, 2022 at 8:

Re: tail

2022-05-06 Thread Dennis Lee Bieber
On Fri, 6 May 2022 21:19:48 +0100, MRAB declaimed the following: >Is the file UTF-8? That's a variable-width encoding, so are any of the >characters > U+007F? > >Which OS? On Windows, it's common/normal for UTF-8 files to start with a >BOM/signature, which is 3 bytes/1 codepoint. Windo

Re: Python/New/Learn

2022-05-06 Thread Greg Ewing
On 7/05/22 12:27 pm, Stefan Ram wrote: But when you read descriptions in books about phonology about how the mouth and tongue is positioned to produce certain sounds and see pictures of this, your faulty ears are bypassed and you get a chance to produce the correct sounds of the fo

Re: Seeking deeper understanding of python equality (==)

2022-05-06 Thread Greg Ewing
On 7/05/22 12:22 am, Jonathan Kaczynski wrote: Stepping through the code with gdb, we see it jump from the compare operator to the dunder-eq method on the UUID object. What I want to be able to do is explain the in-between steps. Generally what happens with infix operators is that the interpret