[RELEASE] Python versions 3.10.7, 3.9.14, 3.8.14, 3.7.14 now available with security content

2022-09-07 Thread Łukasz Langa
We have some security content, and plenty of regular bug fixes for 3.10. Let’s 
dive right in.

 
CVE-2020-10735
 
Converting between int and str in bases other than 2 (binary), 4, 8 (octal), 16 
(hexadecimal), or 32 such as base 10 (decimal) now raises a ValueError 

 if the number of digits in string form is above a limit to avoid potential 
denial of service attacks due to the algorithmic complexity.

Security releases for 3.9.14, 3.8.14, and 3.7.14 are made available 
simultaneously to address this issue, along with some less urgent security 
content.

Upgrading your installations is highly recommended.

 Python 3.10.7

Get it here:

https://www.python.org/downloads/release/python-3107/ 



This bugfix version of Python was released out-of-schedule to address the CVE, 
and as such contains a smaller number of changes compared to 3.10.6 (200 
commits), or in fact 3.9.7 (187 commits) at the same stage of the release cycle 
a year ago. But there’s still over a 100 commits in this latest Python version 
so it’s worth checking out the change log 
.

 And 
now for something completely different

In quantum mechanics, the uncertainty principle (also known as Heisenberg’s 
uncertainty principle) is any of a variety of mathematical inequalities 
asserting a fundamental limit to the accuracy with which the values for certain 
pairs of physical quantities of a particle, such as position and momentum or 
the time and the energy can be predicted from initial conditions.

Such variable pairs are known as complementary variables or canonically 
conjugate variables; and, depending on interpretation, the uncertainty 
principle limits to what extent such conjugate properties maintain their 
approximate meaning, as the mathematical framework of quantum physics does not 
support the notion of simultaneously well-defined conjugate properties 
expressed by a single value.

The uncertainty principle implies that it is in general not possible to predict 
the value of a quantity with arbitrary certainty, even if all initial 
conditions are specified.

 We hope you 
enjoy the new releases!

Thanks to all of the many volunteers who help make Python Development and these 
releases possible! Please consider supporting our efforts by volunteering 
yourself or through organization contributions to the Python Software 
Foundation.

Your friendly release team,

Ned Deily @nad 
Steve Dower @steve.dower 
Pablo Galindo Salgado @pablogsal 
Łukasz Langa @ambv 


signature.asc
Description: Message signed with OpenPGP
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: any author you find very good has written a book on Python?

2022-09-07 Thread Meredith Montgomery
jkn  writes:

> On Tuesday, September 6, 2022 at 4:36:38 PM UTC+1, Meredith Montgomery wrote:
>> Paul Rubin  writes: 
>> 
>> > Meredith Montgomery  writes: 
>> >> So that's my request --- any author you find very good has written a 
>> >> book on Python? 
>> > 
>> > The ones by David Beazley are great. Same with his non-book writings 
>> > about Python. See: http://dabeaz.com/
>> Distilled Python is looking really nice, actually. It seems so concise, 
>> so it looks like a really nice first read. Thank you for the 
>> recommendation.
>
> I concur with Paul's general recommendation of David Beazley's work.
> I bought a copy of Python Distilled recently, having 'grown up' with
> editions of his earlier 'Python Essential Reference', going back to
> the first edition (Python 1.5?)
>
> I confess to being slightly disappointed with 'Python Distilled', but
> I was probably expecting something that I shouldn't have. It is
> basically a relatively fast-paced introduction to 'modern' python,
> stripping down some of the fine detail that the 'Essential Reference'
> books leave in.
>
> I am not 100% sure how useful it would be for relative beginners; it
> depends what you are looking for. As a reference to functions and
> library usage etc., the essential reference books are (still) great,
> and cheap via eBay. As a stepping stone from 'fluent beginner', it
> might well be perfect. As a hand-holding learning guide, maybe not so
> great.
>
> I'm by no means trying to diss Beazley's work, I think it is great;
> just trying to indicate what you get for your money, and maybe the
> target audience.

You got a point.  It's so concise that maybe it's too concise for a
beginner.  But I will take my chances.  I liked it.
-- 
https://mail.python.org/mailman/listinfo/python-list


Question about learning Python

2022-09-07 Thread Maruful Islam
I want to start learning python. I have a question about learning python. 

Is learning C essential or not for learning python?
-- 
https://mail.python.org/mailman/listinfo/python-list


-ffast-math

2022-09-07 Thread Eli the Bearded
https://twitter.com/moyix/status/1567167774039973888

Brendan Dolan-Gavitt @moyix

New blog post is live! In which I download 4 TB of Python packages
containing native x86-64 libraries and see how many of them use
-ffast-math, potentially altering floating point behavior in any
program unlucky enough to load them!


https://moyix.blogspot.com/2022/09/someones-been-messing-with-my-subnormals.html

8:08 AM - Sep 6, 2022

It's quite an adventure, a longish read but fun.

Elijah
--
TL;DR: two dependencies using same misguided makefile cause most issues
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread Sandro Volery
Hey Maruf

> I want to start learning python.
Good for you! Fun times ahead.

> Is learning C essential or not for learning python?
No, I would not say that learning C is essential for learning Python. However, 
C can serve as a great set of fundamentials in programming and understanding 
machines on a low level, such as memory management, etc., which all had to be 
done manually at this time.

It also seems important to note the differences between execution on runtime, 
and compiled languages, but there is many videos / articles that do a better 
job at explaining it than it do.

Best,
Sandro
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: any author you find very good has written a book on Python?

2022-09-07 Thread TheSeeker
On Monday, September 5, 2022 at 9:23:04 PM UTC-5, Meredith Montgomery wrote:
> I never read a book on Python. I'm looking for a good one now. I just 
> searched the web for names such as Charles Petzold, but it looks like he 
> never wrote a book on Python. I also searched for Peter Seibel, but he 
> also never did. I also tried to search for Richard Heathfield. (I took 
> a look at his ``C Unleashed'' once and I liked what I saw.) This is how 
> I search for books --- I go through the authors first. Charles Petzold, 
> for instance, anything he writes is worth reading it. (Have you given 
> his Annotated Turing a shot? It's a very nice read.) 
> 
> So that's my request --- any author you find very good has written a 
> book on Python? 
> 
> It could be for in a certain specific context. For instance, I also 
> searched for Hadley Wickham in the hope that he could have written a 
> data-science-type of book using Python. I like his writing a lot, but 
> he also only seems to have written only for the R language. 
> 
> Thank you!

Mike Driscoll (https://www.blog.pythonlibrary.org/about/) as written a number 
of books for different Python experience levels, which I have found useful.

-Duane Kaufman
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread Lars Liedtke

Hello and welcome,

the answer is a definitive "it depends" ;-)

Generally you do not need knowledge in C for learning Python.

But I'd say that it will not hurt to have some knowledge. Especially 
some packages use C-code to extend Python. But it seems to me that you 
are completely starting to learn how to program. Please correct me if I 
am wrong. So you can definitely learn how to program with learning 
Python and you can learn C afterwards if you need to.


Cheers

Lars


--
Lars Liedtke
Software Entwickler


Phone:  
Fax:+49 721 98993-
E-mail: [email protected]


solute GmbH
Zeppelinstraße 15   
76185 Karlsruhe
Germany


Marken der solute GmbH | brands of solute GmbH
billiger.de | Shopping.de 



Geschäftsführer | Managing Director: Dr. Thilo Gans, Bernd Vermaaten
Webseite | www.solute.de
Sitz | Registered Office: Karlsruhe
Registergericht | Register Court: Amtsgericht Mannheim
Registernummer | Register No.: HRB 110579
USt-ID | VAT ID: DE234663798


Informationen zum Datenschutz | Information about privacy policy
http://solute.de/ger/datenschutz/grundsaetze-der-datenverarbeitung.php

Am 07.09.22 um 12:28 schrieb Maruful Islam:

I want to start learning python. I have a question about learning python.

Is learning C essential or not for learning python?


--
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread Thomas Passin

On 9/7/2022 6:28 AM, Maruful Islam wrote:

I want to start learning python. I have a question about learning python.

Is learning C essential or not for learning python?


Not at all.

--
https://mail.python.org/mailman/listinfo/python-list


Re: any author you find very good has written a book on Python?

2022-09-07 Thread Tim Daneliuk via Python-list

On 9/5/22 21:22, Meredith Montgomery wrote:

I never read a book on Python.  I'm looking for a good one now.  I just
searched the web for names such as Charles Petzold, but it looks like he
never wrote a book on Python.  I also searched for Peter Seibel, but he
also never did.  I also tried to search for Richard Heathfield.  (I took
a look at his ``C Unleashed'' once and I liked what I saw.)  This is how
I search for books --- I go through the authors first.  Charles Petzold,
for instance, anything he writes is worth reading it.  (Have you given
his Annotated Turing a shot?  It's a very nice read.)

So that's my request --- any author you find very good has written a
book on Python?

It could be for in a certain specific context.  For instance, I also
searched for Hadley Wickham in the hope that he could have written a
data-science-type of book using Python.  I like his writing a lot, but
he also only seems to have written only for the R language.

Thank you!


David Beazley

--
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread Chris Angelico
On Thu, 8 Sept 2022 at 01:50, Maruful Islam  wrote:
>
> I want to start learning python. I have a question about learning python.
>
> Is learning C essential or not for learning python?

Absolutely not essential. In fact, I would strongly recommend learning
Python before ever picking up C, as it's much easier to mess around in
Python.

Learning C will definitely help you to become a better programmer, but
you can leave it until later.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread Grant Edwards
On 2022-09-07, Chris Angelico  wrote:
> On Thu, 8 Sept 2022 at 01:50, Maruful Islam  wrote:
>>
>> I want to start learning python. I have a question about learning python.
>>
>> Is learning C essential or not for learning python?
>
> Absolutely not essential. In fact, I would strongly recommend learning
> Python before ever picking up C, as it's much easier to mess around in
> Python.

If you're a beginning programmer, then IMO learning C first is
probably detrimental. C has quite a few quirks and pitfalls that will
a) frustrate you and waste time, and b) influence your way of thinking
about programs in a way that will be unhelpful for higher level
languages.

> Learning C will definitely help you to become a better programmer, but
> you can leave it until later.

Unless it's to work on a real project that's written in C, I'd put C a
fair ways down the list of languages to learn. I'd probably put Python
and then Scheme at the top of the list. Then maybe Smalltalk and
something a bit more functional.

--
Grant

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread Chris Angelico
On Thu, 8 Sept 2022 at 04:54, Grant Edwards  wrote:
>
> On 2022-09-07, Chris Angelico  wrote:
> > On Thu, 8 Sept 2022 at 01:50, Maruful Islam  wrote:
> >>
> >> I want to start learning python. I have a question about learning python.
> >>
> >> Is learning C essential or not for learning python?
> >
> > Absolutely not essential. In fact, I would strongly recommend learning
> > Python before ever picking up C, as it's much easier to mess around in
> > Python.
>
> If you're a beginning programmer, then IMO learning C first is
> probably detrimental. C has quite a few quirks and pitfalls that will
> a) frustrate you and waste time, and b) influence your way of thinking
> about programs in a way that will be unhelpful for higher level
> languages.

Not as detrimental as starting with BASIC, and then moving on to x86
assembly language, and trying to massage the two together using CALL
ABSOLUTE in order to get mouse input in your GW-BASIC programs.

Don't be me, folks.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread Grant Edwards
On 2022-09-07, Chris Angelico  wrote:
> On Thu, 8 Sept 2022 at 04:54, Grant Edwards  wrote:
>
>> If you're a beginning programmer, then IMO learning C first is
>> probably detrimental. [...]
>
> Not as detrimental as starting with BASIC, and then moving on to x86
> assembly language, and trying to massage the two together using CALL
> ABSOLUTE in order to get mouse input in your GW-BASIC programs.

Ah the "good old days".


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread Chris Angelico
On Thu, 8 Sept 2022 at 05:09, Grant Edwards  wrote:
>
> On 2022-09-07, Chris Angelico  wrote:
> > On Thu, 8 Sept 2022 at 04:54, Grant Edwards  
> > wrote:
> >
> >> If you're a beginning programmer, then IMO learning C first is
> >> probably detrimental. [...]
> >
> > Not as detrimental as starting with BASIC, and then moving on to x86
> > assembly language, and trying to massage the two together using CALL
> > ABSOLUTE in order to get mouse input in your GW-BASIC programs.
>
> Ah the "good old days".
>

Indeed. The 1990s gave me all manner of skills, including the
aforementioned mouse control in a BASIC program, writing a
Terminate-and-Stay-Resident program that hooks an interrupt, tricks
for *not* writing a TSR and still acting like one, building GUIs using
pixel precision, building GUIs using pixel precision but fully
automatically, using HTML tables to create layouts oh, yes, so
many skills... To anyone suffering from https://xkcd.com/1479/ right
now, I can assure you, quite a lot of that knowledge DOES eventually
become obsolete when better methods come along. It just sometimes
takes a decade or more.

(And then occasionally it still haunts you. I'm finding table-based
layouts in a site that I now have to manage. Eventually I'll fix it
all, eventually)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread dn
On 08/09/2022 07.15, Chris Angelico wrote:
> On Thu, 8 Sept 2022 at 05:09, Grant Edwards  wrote:
>>
>> On 2022-09-07, Chris Angelico  wrote:
>>> On Thu, 8 Sept 2022 at 04:54, Grant Edwards  
>>> wrote:
>>>
 If you're a beginning programmer, then IMO learning C first is
 probably detrimental. [...]
>>>
>>> Not as detrimental as starting with BASIC, and then moving on to x86
>>> assembly language, and trying to massage the two together using CALL
>>> ABSOLUTE in order to get mouse input in your GW-BASIC programs.
>>
>> Ah the "good old days".
>>
> 
> Indeed. The 1990s gave me all manner of skills, including the
> aforementioned mouse control in a BASIC program, writing a
> Terminate-and-Stay-Resident program that hooks an interrupt, tricks
> for *not* writing a TSR and still acting like one, building GUIs using
> pixel precision, building GUIs using pixel precision but fully
> automatically, using HTML tables to create layouts oh, yes, so
> many skills... To anyone suffering from https://xkcd.com/1479/ right
> now, I can assure you, quite a lot of that knowledge DOES eventually
> become obsolete when better methods come along. It just sometimes
> takes a decade or more.
> 
> (And then occasionally it still haunts you. I'm finding table-based
> layouts in a site that I now have to manage. Eventually I'll fix it
> all, eventually)

OP: Python!

Python has become one of the most popular first-languages to use in
universities (etc). On-the-ground this varies by country, even by
province/state. However, starting at a higher-level is recommendable -
and should the learner decide that 'this computer stuff is not for me'
(XKCD not withstanding) then the cost of effort-expended will be less.
Also, there are are plenty of coders 'out there' who don't seem to have
learned, or even need, the detail one acquires using a lower-level
language. (no further comment on that!)


TSRs? Now that was an ugly period of history! (trying to make a
single-process operating system do multi-processing - only to find that
many program[me]s assumed they had full use and undisputed control of
the computer. Happy days...)

History has its value. Talking to a group the other day, showed how
IT-skills from patterns (eg Factory, Strategy, Decorator) and paradigms
(eg Modular Programming, Structured Programming) through to
Architectural Principles (eg SOLID) and project management approaches
(eg Waterfall, Agile, SCRUM) all descend from hard-won knowledge and
sometimes bitter-experience. Chunks of which pre-date Dartmouth BASIC,
PCs, mini-computers, and 'family'/standardised-hardware operating systems!

On the other hand, one can start too 'high' or too 'modern'. Like the
person enthusing about MSFT's and AWS' programming AIs, thinking that
such tools will replace programmers (one of the aims of the COBOL
language back in the 1960s). His short-form description spoke volumes:
'it saves anyone from having to look-up Stack Overflow any more' - a
'blind' cut-and-paste prospect that saves the 'author' from the
difficulties of 'learning stuff'; until it is time to, um, learn-stuff -
to know why one needs to learn-stuff BEFORE taking from SO/AI.

-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread Meredith Montgomery
Maruful Islam  writes:

> I want to start learning python. I have a question about learning python. 
>
> Is learning C essential or not for learning python?

Surely not necessary.  There's a generous recent thread about books on
Python.  Have a look at it.
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Question about learning Python

2022-09-07 Thread avi.e.gross
Maybe we should ask WHY the person asking the question about how to learn a
computer language called Python is pairing it with the idea of whether to
also learn C.

What are they preparing for? Most people using Python have absolutely no
reason to learn C, or C++  or C# or JAVA or one of a bewildering number of
other languages. They may end up using functions that unknown to them have
been partially implemented using libraries created in C or other languages
but so what? They never see that except if they want to look at source code.

So are they looking for a job that will require not just Python but also C?

If anything, it is an impediment for many people to learn two rather
different languages at about the same time as many things are very different
and lessons in one often do not carry over well to the other. As examples, C
uses braces to group things and Python uses indentation and C tends to need
things like data types spelled out and Python mostly does not care what type
it is.

Now if a question is asked about how to learn a relatively few languages
with different paradigms that represent an assortment of ways to think about
and solve problems, sure, C might take a slot. But arguably you may want
something more modern that is somewhat descended from C as a compiled
language.

If your goal is to use Python in ways it is designed to be used, learning C
first may spoil your thinking and you may implement algorithms in Python
that loosely translate the way it is done in C but can be done much nicer
using Python costructs.


-Original Message-
From: Python-list  On
Behalf Of Meredith Montgomery
Sent: Wednesday, September 7, 2022 3:35 PM
To: [email protected]
Subject: Re: Question about learning Python

Maruful Islam  writes:

> I want to start learning python. I have a question about learning python. 
>
> Is learning C essential or not for learning python?

Surely not necessary.  There's a generous recent thread about books on
Python.  Have a look at it.
--
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Question about learning Python

2022-09-07 Thread avi.e.gross
Chris,

I started with BASIC in high school and kept shifting my focus from one
computer language to another long before I even looked at Python. 

Arguably each language had a REASON for existing so it supported some ideas
or paradigms or ways of looking at things. Many at first were rather focused
on doing one or a few things well, and others not so well or not at all. No
need to rehash it.

In a sense, many modern languages can be viewed as containing multiple
overlapping modules which collectively do all kinds of things in many ways
and can do whatever many earlier initial releases of earlier languages did,
sometimes better but also sometimes slower. If you look at Python as a base
and added modules, it can do all the mathematical things of say FORTRAN,
manipulate text and produce reports and on and on. But it also can NOT do
things done in basic, or at least not easily, like subroutines and goto's
that are associated with a more primitive way to solve problems. 

Is there any purpose in teaching new students how to structure your code so
that you use such methods? Well, maybe. I mean we have all kinds of slightly
hidden ways to do a GOTO in some languages such as breaking out of a nested
loop. Underneath it all, an IF/THEN/ELSE type of statement has regions you
jump between. But arguably it is helpful to see operations on a higher level
and leave the details of how it is accomplished in well tested code within
the interpreter or compiler.

C was designed on purpose to do some things that a language like PASCAL was
designed not to allow or make easy. Both started off though as fairly simple
languages that did things somewhat linearly. You can obviously emulate many
things using a simplified subset of Python that would allow programs in
those languages to be done. If that is all you want to learn, fine. But if
your goal is to make use of OO and functional programming and other
paradigms supported, ...

As I posted elsewhere, I ask why the questioner specifically mentioned C. I
also use R and there too, C is only needed if you want to speed up some
function by writing parts in their version of C or C++. The fact that many
interpreters are written (or sometimes were written) in C is not really
relevant.


-Original Message-
From: Python-list  On
Behalf Of Chris Angelico
Sent: Wednesday, September 7, 2022 2:58 PM
To: [email protected]
Subject: Re: Question about learning Python

On Thu, 8 Sept 2022 at 04:54, Grant Edwards 
wrote:
>
> On 2022-09-07, Chris Angelico  wrote:
> > On Thu, 8 Sept 2022 at 01:50, Maruful Islam 
wrote:
> >>
> >> I want to start learning python. I have a question about learning
python.
> >>
> >> Is learning C essential or not for learning python?
> >
> > Absolutely not essential. In fact, I would strongly recommend 
> > learning Python before ever picking up C, as it's much easier to 
> > mess around in Python.
>
> If you're a beginning programmer, then IMO learning C first is 
> probably detrimental. C has quite a few quirks and pitfalls that will
> a) frustrate you and waste time, and b) influence your way of thinking 
> about programs in a way that will be unhelpful for higher level 
> languages.

Not as detrimental as starting with BASIC, and then moving on to x86
assembly language, and trying to massage the two together using CALL
ABSOLUTE in order to get mouse input in your GW-BASIC programs.

Don't be me, folks.

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list