RE: NoneType List

2023-01-01 Thread avi.e.gross
Not to wax poetic about our pasts, Thomas, but I do did not start with PASCAL and used quite a few languages before and plenty after. At the time it had interesting contrasts to languages like BASIC, FORTRAN and LISP and I tended to use whatever was available on the machines I was using. My first c

Re: NoneType List

2023-01-01 Thread Thomas Passin
On 1/1/2023 9:14 PM, avi.e.gr...@gmail.com wrote: Thomas, I used PASCAL before C and I felt like I was wearing a straitjacket at times in PASCAL when I was trying to write encryption/decryption functions and had to find ways to fiddle with bits. Similar things were easy in C, and are even easier

Re: Python-list Digest, Vol 232, Issue 1

2023-01-01 Thread Christman, Roger Graydon
Re: Nonetype List In my introductory programming course, I have drawn some attention to this behavior regarding mutating lists. Indeed, Python is very consistent with its behavior: Any function that mutates a list parameter does not return that list as a return value. For one thing, there is

RE: NoneType List

2023-01-01 Thread avi.e.gross
Thomas, I used PASCAL before C and I felt like I was wearing a straitjacket at times in PASCAL when I was trying to write encryption/decryption functions and had to find ways to fiddle with bits. Similar things were easy in C, and are even easier in many more recent languages such as Python. The

Re: NoneType List

2023-01-01 Thread Goran Ikac
Thank you, guys, thank you very much! I'm amazed by the time and effort so many of you have put into the answers. And at this time of year! Not only is the issue clear to me now, but I learned a lot (and I'm still to learn a lot more) from your answers and the links you provided. And not only about

RE: NoneType List

2023-01-01 Thread avi.e.gross
Several of you have mentioned the role of history in the development of languages and what the founders of a language were trying to improve. As noted with PASCAL, some earlier languages strived to be different things and in a certain sense, their procedures were perhaps seen as a safer and better

Re: NoneType List

2023-01-01 Thread Thomas Passin
On 1/1/2023 8:47 AM, Stefan Ram wrote: Thomas Passin writes: Guido had been working on the ABC language for some years before he developed Python. ABC was intended mainly as a teaching and prototyping language. In those days, there used to be a language called "Pascal". Pascal had a di

Re: Possible re bug when using ".*"

2023-01-01 Thread Peter J. Holzer
On 2022-12-28 19:07:06 +, MRAB wrote: > On 2022-12-28 18:42, Alexander Richert - NOAA Affiliate via Python-list > wrote: > > print(re.sub(".*", "replacement", "pattern")) > > yields the output "replacementreplacement". [...] > It's not a bug, it's a change in behaviour to bring it more into lin

NoneType List

2023-01-01 Thread Goran Ikac
Thank you, guys, thank you very much! I'm amazed by the time and effort so many of you have put into the answers. And at this time of year! Not only is the issue clear to me now, but I learned a lot (and I'm still to learn a lot more) from your answers and the links you provided. And not only about

Re: NoneType List

2023-01-01 Thread Thomas Passin
On 12/31/2022 10:17 PM, avi.e.gr...@gmail.com wrote: Agreed, there are lots of pro/con arguments and the feature is what it is historically and not trivial to change. Inline changes to an object make sense to just be done "silently" and if there are errors, they propagate the usual way. As Guid