Re: new here

2024-08-28 Thread rbowman via Python-list
On Wed, 28 Aug 2024 08:41:28 +0100, Daniel wrote: > That is so cool. I've had the same idea to use the API with AWS for my > bbs. I also want to do the same thing for other government sites like > ecfr for pulling aviation regulations. > > Is your code somewhere I can look at it? The NOAA? I di

Re: new here

2024-08-28 Thread Daniel via Python-list
rbowman writes: > On Sun, 25 Aug 2024 21:29:30 -0400, avi.e.gross wrote: > >> If everyone will pardon my curiosity, who and what purposes are these >> smaller environments for and do many people use them? >> >> I mean the price of a typical minimal laptop is not a big deal today. So >> are these

Re: new here

2024-08-26 Thread rbowman via Python-list
On Sun, 25 Aug 2024 21:29:30 -0400, avi.e.gross wrote: > If everyone will pardon my curiosity, who and what purposes are these > smaller environments for and do many people use them? > > I mean the price of a typical minimal laptop is not a big deal today. So > are these for some sort of embedded

RE: new here

2024-08-25 Thread AVI GROSS via Python-list
: Sunday, August 25, 2024 10:05 PM To: python-list@python.org Subject: Re: new here On 2024-08-26 02:29, AVI GROSS via Python-list wrote: > If everyone will pardon my curiosity, who and what purposes are these > smaller environments for and do many people use them? > > I mean th

Re: new here

2024-08-25 Thread MRAB via Python-list
om: Python-list On Behalf Of rbowman via Python-list Sent: Friday, August 23, 2024 1:22 AM To: python-list@python.org Subject: Re: new here On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote: Adding a display to the Pico-W is my next project... After that, gyros (am thinking it may not go so well, on bala

Re: new here

2024-08-25 Thread dn via Python-list
It appears there were some delays in the email/servers. Thanks for this (and earlier) ideas and advice! On 23/08/24 17:38, rbowman via Python-list wrote: On Thu, 22 Aug 2024 19:56:54 -0700, Paul Rubin wrote: With MicroPython on the Pico, you use some command line utility to transfer files ins

RE: new here

2024-08-25 Thread AVI GROSS via Python-list
Message- From: Python-list On Behalf Of rbowman via Python-list Sent: Friday, August 23, 2024 1:22 AM To: python-list@python.org Subject: Re: new here On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote: > Adding a display to the Pico-W is my next project... After that, gyros > (am thinking

Re: new here

2024-08-25 Thread Keith Thompson via Python-list
Lawrence D'Oliveiro writes: > On 23 Aug 2024 03:43:15 GMT, rbowman wrote: >> I am confused by the cross-over to Python-list. I only read/post to >> comp.lang.python. Is that echoed to Python-list or vice versa? > > This has been happening, without asking our permission, for years. The comp.lang.p

Re: new here

2024-08-25 Thread Marco Moock via Python-list
On 20.08.2024 um 23:26 Uhr Daniel wrote: > New here. I've perused some posts and haven't seen a posting FAQ for > this NG. I'm learning python right now to realize some hobby goals I > have regarding some smolnet services. What are the NG standards on > pasting code in messages? Do yall prefer I p

Re: new here

2024-08-25 Thread rbowman via Python-list
On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote: > Adding a display to the Pico-W is my next project... After that, gyros > (am thinking it may not go so well, on balance... hah!). https://toptechboy.com/two-axis-tilt-meter-displaying-pitch-and-roll- using-an-mpu6050-on-the-raspberry-pi-pico-w/ You

Re: new here

2024-08-25 Thread rbowman via Python-list
On Thu, 22 Aug 2024 19:56:54 -0700, Paul Rubin wrote: > With MicroPython on the Pico, you use some command line utility to > transfer files instead, but it is no big deal. Loading the UF2 is easy. https://www.raspberrypi.com/documentation/microcontrollers/ micropython.html I use VS Code with th

Re: new here

2024-08-22 Thread dn via Python-list
On 23/08/24 15:43, rbowman via Python-list wrote: On Fri, 23 Aug 2024 08:36:02 +1200, dn wrote: On 23/08/24 07:49, rbowman via Python-list wrote: On Thu, 22 Aug 2024 10:40:52 -0700, Paul Rubin wrote: The Pico uses MicroPython which is stuck on an old version of Python, unfortunately. How di

Re: new here

2024-08-22 Thread rbowman via Python-list
On Fri, 23 Aug 2024 08:36:02 +1200, dn wrote: > On 23/08/24 07:49, rbowman via Python-list wrote: >> On Thu, 22 Aug 2024 10:40:52 -0700, Paul Rubin wrote: >> >>> The Pico uses MicroPython which is stuck on an old version of Python, >>> unfortunately. > > How did this enter the conversation/threa

Re: new here

2024-08-22 Thread dn via Python-list
On 23/08/24 07:49, rbowman via Python-list wrote: On Thu, 22 Aug 2024 10:40:52 -0700, Paul Rubin wrote: The Pico uses MicroPython which is stuck on an old version of Python, unfortunately. How did this enter the conversation/thread? Paul's 'contribution' does not even appear on the Archive..

Re: new here

2024-08-22 Thread rbowman via Python-list
On Thu, 22 Aug 2024 09:10:00 +0100, Daniel wrote: > If you have lynx, you can visit this gopher interface to Wikipedia: > > gopher://gopherpedia.com Yeah, that works and I could find Hillbilly Elegy (film). The text was fine but the 'Accolades' table was garbled. It came up on the Netflix reco

RE: new here

2024-08-22 Thread AVI GROSS via Python-list
they were a tad tone deaf and did not seem to care if anyone objected. Let's keep this forum going. -Original Message- From: Python-list On Behalf Of Dan Sommers via Python-list Sent: Wednesday, August 21, 2024 4:57 AM To: python-list@python.org Subject: Re: new here On 2024-08-20 at

Re: new here

2024-08-22 Thread rbowman via Python-list
On Thu, 22 Aug 2024 10:40:52 -0700, Paul Rubin wrote: > The Pico uses MicroPython which is stuck on an old version of Python, > unfortunately. I think it's up to 3.4 in general and erratic past that. It doesn't have the match from 3.10. I don't think it has f-strings though it may have the wal

Re: new here

2024-08-22 Thread Daniel via Python-list
Jason Friedman writes: > On Wed, Aug 21, 2024 at 4:04 PM Daniel via Python-list < > python-list@python.org> wrote: > >> >> An example of use, here's a weather service tied to a finger. Put your >> city name as the user. This isn't mine, but it is inspiring. Example: >> >> finger mi...@graph.no >>

Re: new here

2024-08-22 Thread Daniel via Python-list
rbowman writes: > On Wed, 21 Aug 2024 22:15:37 +0100, Daniel wrote: > >> Lesser used protocols not known by many in the mainstream. Such as: >> >> gopher, gemini, finger, spartan, titan, etc. >> >> An example of use, here's a weather service tied to a finger. Put your >> city name as the user.

Re: new here

2024-08-22 Thread rbowman via Python-list
On Thu, 22 Aug 2024 13:43:59 +1200, dn wrote: > The OpSys on this machine no longer features finger (available for > installation as an 'extra'). My Ubuntu 22.04 box has it, the Fedora 40 one doesn't. Ubuntu offers to install gopher, Fedora doesn't. Go figure. -- https://mail.python.org/mailma

Re: new here

2024-08-22 Thread rbowman via Python-list
On Wed, 21 Aug 2024 22:15:37 +0100, Daniel wrote: > Lesser used protocols not known by many in the mainstream. Such as: > > gopher, gemini, finger, spartan, titan, etc. > > An example of use, here's a weather service tied to a finger. Put your > city name as the user. This isn't mine, but it is

Re: new here

2024-08-22 Thread rbowman via Python-list
On Wed, 21 Aug 2024 22:04:14 +0100, Daniel wrote: > I am on forums but tend to stay away from them unless I absolutely have > to. I like newsgroups as they are - though I have noticed a massive drop > in users ever since Google dropped their groups service. I also saw a > minor drop in spam. Abso

Re: new here

2024-08-21 Thread Jason Friedman via Python-list
On Wed, Aug 21, 2024 at 4:04 PM Daniel via Python-list < python-list@python.org> wrote: > > An example of use, here's a weather service tied to a finger. Put your > city name as the user. This isn't mine, but it is inspiring. Example: > > finger mi...@graph.no > > For all options, go to the help f

Re: new here

2024-08-21 Thread dn via Python-list
On 22/08/24 09:15, Daniel via Python-list wrote: rbowman writes: On Tue, 20 Aug 2024 23:26:39 +0100, Daniel wrote: ... smolnet, as in things like Lesser used protocols not known by many in the mainstream. Such as: gopher, gemini, finger, spartan, titan, etc. An example of use, here's a

Re: new here

2024-08-21 Thread Daniel via Python-list
rbowman writes: > On Tue, 20 Aug 2024 23:26:39 +0100, Daniel wrote: > >> New here. I've perused some posts and haven't seen a posting FAQ for >> this NG. I'm learning python right now to realize some hobby goals I >> have regarding some smolnet services. What are the NG standards on >> pasting co

Re: new here

2024-08-21 Thread Daniel via Python-list
dn writes: > On 21/08/24 10:26, Daniel via Python-list wrote: >> Hi folks - >> New here. I've perused some posts and haven't seen a posting FAQ for >> this NG. I'm learning python right now to realize some hobby goals I >> have regarding some smolnet services. What are the NG standards on >> past

Re: new here

2024-08-21 Thread dn via Python-list
On 21/08/24 10:26, Daniel via Python-list wrote: Hi folks - New here. I've perused some posts and haven't seen a posting FAQ for this NG. I'm learning python right now to realize some hobby goals I have regarding some smolnet services. What are the NG standards on pasting code in messages? Do ya

Re: new here

2024-08-21 Thread Dan Sommers via Python-list
On 2024-08-20 at 23:16:48 -0400, AVI GROSS via Python-list wrote: > I do wonder if the people at python.org want multiple forums. There is > also one that sort of tutors people that obviously has an overlapping > but different audience. $ python -m this The Zen of Python, by Tim Peters [...] The

Re: new here

2024-08-20 Thread rbowman via Python-list
On Tue, 20 Aug 2024 23:16:48 -0400, avi.e.gross wrote: > I do wonder if the people at python.org want multiple forums. There is > also one that sort of tutors people that obviously has an overlapping > but different audience. https://realpython.com/ That's a mixed bag. Joining is $50 USD/month o

Re: new here

2024-08-20 Thread rbowman via Python-list
On Tue, 20 Aug 2024 23:26:39 +0100, Daniel wrote: > New here. I've perused some posts and haven't seen a posting FAQ for > this NG. I'm learning python right now to realize some hobby goals I > have regarding some smolnet services. What are the NG standards on > pasting code in messages? Do yall p

RE: new here

2024-08-20 Thread AVI GROSS via Python-list
ython-list@python.org Subject: Re: new here On 2024-08-20 23:26, Daniel via Python-list wrote: > Hi folks - > > New here. I've perused some posts and haven't seen a posting FAQ for > this NG. I'm learning python right now to realize some hobby goals I > have regarding som

Re: new here

2024-08-20 Thread MRAB via Python-list
On 2024-08-20 23:26, Daniel via Python-list wrote: Hi folks - New here. I've perused some posts and haven't seen a posting FAQ for this NG. I'm learning python right now to realize some hobby goals I have regarding some smolnet services. What are the NG standards on pasting code in messages? Do

Re: New computer, new Python

2022-12-09 Thread Thomas Passin
It sounds like on your old computer, you used some kind of program to write python code and perhaps to run it too. It would help if you could say what that program was. Python itself - the actual program called "python.exe" on Windows - runs a Python interpreter inside a Windows console windo

Re: New computer, new Python

2022-12-09 Thread Mats Wichmann
On 12/9/22 14:56, rbowman wrote: On Fri, 9 Dec 2022 12:13:16 -0500 (EST), ker...@polaris.net wrote: How can I write my own Python Functions and subroutines in the new Python? Personally, I would go with VS Code: https://learn.microsoft.com/en-us/training/modules/python-install-vscode/ It su

Re: New computer, new Python

2022-12-09 Thread rbowman
On Fri, 9 Dec 2022 12:13:16 -0500 (EST), ker...@polaris.net wrote: > How can I write my own Python Functions and subroutines in the new > Python? Personally, I would go with VS Code: https://learn.microsoft.com/en-us/training/modules/python-install-vscode/ It supports virtual environments nicel

Re: New computer, new Python

2022-12-09 Thread Weatherby,Gerard
Python in an IDE is much easier in the long run. We use PyCharm – there’s a free version: https://www.jetbrains.com/pycharm/download/#section=windows From: Python-list on behalf of DFS Date: Friday, December 9, 2022 at 4:36 PM To: python-list@python.org Subject: Re: New computer, new Python

Re: New computer, new Python

2022-12-09 Thread DFS
On 12/9/2022 12:13 PM, ker...@polaris.net wrote: Hello. I've downloaded the new Python to my new Computer, and the new Python mystifies me. Instead of an editor, it looks like a Dos executable program. python.exe is a Windows executable. How can I write my own Python Functions and

Re: New computer, new Python

2022-12-09 Thread dn
On 10/12/2022 06.13, ker...@polaris.net wrote: Hello. I've downloaded the new Python to my new Computer, and the new Python mystifies me. Instead of an editor, it looks like a Dos executable program. How can I write my own Python Functions and subroutines in the new Python? It is v

Re: [Python-ideas] Re: New Tool Proposal

2022-05-11 Thread anthony.flury via Python-list
On 10/05/2022 15:04, Dan Stromberg wrote: On Tue, May 10, 2022 at 3:15 AM Chris Angelico wrote: > It is often the case that developer write Code in Python and then convert to a C extension module for performance regions. > > A C extension module has a lot of boiler plate code

Re: [Python-ideas] Re: New Tool Proposal

2022-05-10 Thread Del Mervine
On 5/10/22 5:14 AM, Chris Angelico wrote: On Tue, 10 May 2022 at 19:57, anthony.flury wrote: On 10/05/2022 09:20, Chris Angelico wrote: On Tue, 10 May 2022 at 18:06, anthony.flury via Python-ideas wrote: A proposal for a new tool to be implemented - It is often the case that developer wri

Re: [Python-ideas] Re: New Tool Proposal

2022-05-10 Thread Dan Stromberg
On Tue, May 10, 2022 at 3:15 AM Chris Angelico wrote: > > It is often the case that developer write Code in Python and then > convert to a C extension module for performance regions. > > > > A C extension module has a lot of boiler plate code - for instance the > Structures required for each clas

Re: [Python-ideas] Re: New Tool Proposal

2022-05-10 Thread Chris Angelico
On Tue, 10 May 2022 at 19:57, anthony.flury wrote: > > > On 10/05/2022 09:20, Chris Angelico wrote: > > On Tue, 10 May 2022 at 18:06, anthony.flury via Python-ideas > wrote: > > A proposal for a new tool to be implemented - > > It is often the case that developer write Code in Python and then co

Re: new sorting algorithm

2022-05-02 Thread Dan Stromberg
On Mon, May 2, 2022 at 2:25 AM jan via Python-list wrote: > Hi, > > > The median-of-three partitioning technique makes that work reasonably > well, so it won't be pathologically slow > > Just to be clear because I've wondered but haven't looked into it, we > know naive quicksorting of already-sor

Re: new sorting algorithm

2022-05-02 Thread Mats Wichmann
On 5/2/22 07:09, charles hottel wrote: > Some versions of Quicksort switch over to Straight Insertion Sort when > the partitions become small enough. The correct size will vary depending > on the hardware. > > I have not kept up with the latest improvements and I am not familiar > with TimSort. 

Re: new sorting algorithm

2022-05-02 Thread charles hottel
On 5/1/2022 7:45 PM, Chris Angelico wrote: On Mon, 2 May 2022 at 09:20, Dan Stromberg wrote: On Sun, May 1, 2022 at 1:44 PM Chris Angelico wrote: On Mon, 2 May 2022 at 06:43, Dan Stromberg wrote: On Sun, May 1, 2022 at 11:10 AM Chris Angelico wrote: On Mon, 2 May 2022 at 01:53, Nas Ba

Re: new sorting algorithm

2022-05-02 Thread jan via Python-list
Hi, > The median-of-three partitioning technique makes that work reasonably well, so it won't be pathologically slow Just to be clear because I've wondered but haven't looked into it, we know naive quicksorting of already-sorted data is pathalogical, but median-of-3 is known to fix this pathology

Re: new sorting algorithm

2022-05-01 Thread Chris Angelico
On Mon, 2 May 2022 at 09:20, Dan Stromberg wrote: > > > On Sun, May 1, 2022 at 1:44 PM Chris Angelico wrote: >> >> On Mon, 2 May 2022 at 06:43, Dan Stromberg wrote: >> > On Sun, May 1, 2022 at 11:10 AM Chris Angelico wrote: >> >> >> >> On Mon, 2 May 2022 at 01:53, Nas Bayedil wrote: >> >> > We

Re: new sorting algorithm

2022-05-01 Thread Dan Stromberg
On Sun, May 1, 2022 at 1:44 PM Chris Angelico wrote: > On Mon, 2 May 2022 at 06:43, Dan Stromberg wrote: > > On Sun, May 1, 2022 at 11:10 AM Chris Angelico wrote: > >> > >> On Mon, 2 May 2022 at 01:53, Nas Bayedil wrote: > >> > We believe that using this method to develop completely new, fast

Re: new sorting algorithm

2022-05-01 Thread Chris Angelico
On Mon, 2 May 2022 at 01:53, Nas Bayedil wrote: > We believe that using this method to develop completely new, fast > algorithms, approaching the speed of the famous *QuickSort*, the speed of > which cannot be surpassed, but its drawback can be circumvented, in the > sense of stack overflow, on so

Re: new sorting algorithm

2022-05-01 Thread Dan Stromberg
This probably should start out as a module on Pypi. Is the sorting stable? Python guarantees that. On Sun, May 1, 2022 at 8:53 AM Nas Bayedil wrote: > *Dear, Sir/Madam* > > > Let me first tell you briefly who we are and where we are from, what we do. > > My name is Nas (full name Nasipa Bayedil

Re: new sorting algorithm

2022-05-01 Thread Marco Sulla
I suppose you should write to python-...@python.org , or in https://discuss.python.org/ under the section Core development -- https://mail.python.org/mailman/listinfo/python-list

RE: New assignmens ...

2021-10-29 Thread Avi Gross via Python-list
29, 2021 10:04 AM To: python-list@python.org Subject: Re: New assignmens ... Op 28/10/2021 om 19:36 schreef Avi Gross via Python-list: > Now for a dumb question. Many languages allow a form of setting a variable to > a value like: > > > > assign(var, 5+sin(x))

Re: New assignmens ...

2021-10-29 Thread Antoon Pardon
Op 28/10/2021 om 19:36 schreef Avi Gross via Python-list: Now for a dumb question. Many languages allow a form of setting a variable to a value like: assign(var, 5+sin(x)) If we had a function that then returned var or the value of var, cleanly, then would that al

Re: New assignmens ...

2021-10-28 Thread Antoon Pardon
Op 28/10/2021 om 19:36 schreef Avi Gross via Python-list: Antoon, You keep beating a dead horse. NOBODY denies there are benefits to suggestions like the one we are describing. It is a logical fallacy to keep arguing this way. Please point to the specific logical falacy you think I am co

Re: New assignmens ...

2021-10-28 Thread Chris Angelico
On Fri, Oct 29, 2021 at 4:37 AM Avi Gross via Python-list wrote: > Now for a dumb question. Many languages allow a form of setting a variable to > a value like: > > assign(var, 5+sin(x)) > > If we had a function that then returned var or the value of var, cleanly, > then would th

RE: New assignmens ...

2021-10-28 Thread Avi Gross via Python-list
ect: Re: New assignmens ... Op 27/10/2021 om 20:20 schreef Avi Gross: I think anyone who suggests we should separate costs from benefits belongs securely within the academic world and should remain there. Practical things need to be built considering costs. Theoretical things, sure, cost is

Re: New assignmens ...

2021-10-28 Thread Jon Ribbens via Python-list
On 2021-10-28, Paul Rubin wrote: > Chris Angelico writes: >> But it all depends on the exact process being done, which is why I've >> been asking for real examples. > > My most frequent use case for walrus is so common that I have sometimes > implemented a special class for it: > >if g := re.

Re: New assignmens ...

2021-10-28 Thread Antoon Pardon
Op 27/10/2021 om 17:05 schreef Christman, Roger Graydon: I'm going to provide two loop-and-a-half segments to illustrate my interpretation of this PEP and the purpose of the walrus operator: [ first example ] Now contrast with this example: Without the walrus: replay = True while replay:

Re: New assignmens ...

2021-10-28 Thread Antoon Pardon
Op 27/10/2021 om 20:20 schreef Avi Gross: I think anyone who suggests we should separate costs from benefits belongs securely within the academic world and should remain there. Practical things need to be built considering costs. Theoretical things, sure, cost is not an issue. Seperating co

Re: New assignmens ...

2021-10-27 Thread Chris Angelico
On Thu, Oct 28, 2021 at 11:08 AM Avi Gross via Python-list wrote: > > Dave, > > You make me wonder about unintended side effects. Are we allowing the ++ and > --- operations into Python through a side door? > class IncrementableInteger(int): def __pos__(self): return HalfIncremented(self)

RE: New assignmens ...

2021-10-27 Thread Avi Gross via Python-list
Of dn via Python-list Sent: Wednesday, October 27, 2021 4:38 AM To: python-list@python.org Subject: Re: New assignmens ... On 24/10/2021 22.23, O365 Dict wrote: > Well I have the following use case: > > while (temp_result := calculate_next_couple(a, b))[1]: > a, b =

Re: New assignmens ...

2021-10-27 Thread Abdur-Rahmaan Janhangeer
I no longer track the threads on the subject ... Many simultaneous ones ongoing! Kind Regards, Abdur-Rahmaan Janhangeer about | blog github Mauritius -- https://mail.python.org/mailman/listin

Re: New assignmens ...

2021-10-27 Thread Chris Angelico
On Thu, Oct 28, 2021 at 4:34 AM Christman, Roger Graydon wrote: > Do you put special code in next_couple() to recognize that the provided > arguments > are actually the first couple so it can return those unmodified, but then > require its > own mental note not to give you an infinite loop forev

Re: New assignmens ...

2021-10-27 Thread Chris Angelico
On Thu, Oct 28, 2021 at 4:03 AM Antoon Pardon wrote: > > So suppose I have an arbitrary number of simple statements. The > latter possible using results from previous assignment and at the > end a condition to control the one and a half loop. How do you write > the python code so that the one and

RE: New assignmens ...

2021-10-27 Thread Avi Gross via Python-list
the walrus and like it and it makes coding easier AND they ask for more, it may come, at incremental cost. -Original Message- From: Python-list On Behalf Of Antoon Pardon Sent: Wednesday, October 27, 2021 2:59 AM To: python-list@python.org Subject: Re: New assignmens ... Op 26/10/2021 om

Re: New assignmens ...

2021-10-27 Thread Christman, Roger Graydon
On 27/10/2021 8:28, Anton Pardon wrote: >>> Suppose I would like to write a loop as follows: >>. >while ((a, b) := next_couple(a, b))[1]: >> >do needed calculations >> >> >>> What I can do is write it as follows: >>> while [tmp := next_couple(a,b), a := tmp[0], b := tmp[1]][

Re: New assignmens ...

2021-10-27 Thread Antoon Pardon
Op 27/10/2021 om 18:16 schreef Christman, Roger Graydon: On 27/10/2021 at 12:45 Antoon Pardon wrote: However with the introduction of the walrus operator there is a way to simulate a significant number of one and a half loops. Consider the following: >do > a = expr1 >

Re: New assignmens ...

2021-10-27 Thread Christman, Roger Graydon
On 27/10/2021 at 12:45 Antoon Pardon wrote: > However with the introduction of the walrus operator there is a > way to simulate a significant number of one and a half loops. > Consider the following: >do > a = expr1 > b = expr2 > while 2 * a > b: > more calculations

Re: New assignmens ...

2021-10-27 Thread Antoon Pardon
Op 27/10/2021 om 11:59 schreef Chris Angelico: You can argue the word "need" all you like, but the fact remains that YOU want a change, so YOU have to convince people of the benefits. That is true. But there is nothing wrong in asking what might convince people. But I'll give you my thought

Re: New assignmens ...

2021-10-27 Thread Chris Angelico
On Wed, Oct 27, 2021 at 8:20 PM Antoon Pardon wrote: > > > > Op 27/10/2021 om 10:49 schreef Chris Angelico: > > On Wed, Oct 27, 2021 at 7:46 PM Antoon Pardon wrote: > >>> So if you want this added, show a use-case that makes it look way > >>> better than the alternatives (including a generator, a

Re: New assignmens ...

2021-10-27 Thread Peter J. Holzer
On 2021-10-24 11:23:48 +0200, O365 Dict wrote: > do: > a, b = calculate_next_couple(a, b) > while b: > more calculations I actually like that syntax. -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at

Re: New assignmens ...

2021-10-27 Thread Peter J. Holzer
On 2021-10-27 19:05:52 +1100, Chris Angelico wrote: > On Wed, Oct 27, 2021 at 6:00 PM Antoon Pardon wrote: > > while (a, b) := next_couple(a,b)[-1]: > > ... [...] > I'm not sure that it's much of a use-case; isn't it an infinite loop as > written? > > And that's the problem. With multiple-

Re: New assignmens ...

2021-10-27 Thread Antoon Pardon
Op 27/10/2021 om 10:49 schreef Chris Angelico: On Wed, Oct 27, 2021 at 7:46 PM Antoon Pardon wrote: So if you want this added, show a use-case that makes it look way better than the alternatives (including a generator, a mid-loop break, etc). Way better according to which criteria? IMO to r

Re: New assignmens ...

2021-10-27 Thread Antoon Pardon
Op 27/10/2021 om 10:38 schreef dn via Python-list: On 24/10/2021 22.23, O365 Dict wrote: Well I have the following use case: while (temp_result := calculate_next_couple(a, b))[1]: a, b = temp_result more calculations Which IMO would be clearer if I could just write:

Re: New assignmens ...

2021-10-27 Thread Chris Angelico
On Wed, Oct 27, 2021 at 7:39 PM dn via Python-list wrote: > Accordingly: is this a job for the walrus operator at all? Let's "talk > of many [other] things"*. +1 > Could we use a data structure to continue to keep things straight-forward? > > class my_class(): > def __init__( self, a, b )->N

Re: New assignmens ...

2021-10-27 Thread Chris Angelico
On Wed, Oct 27, 2021 at 7:46 PM Antoon Pardon wrote: > > So if you want this added, show a use-case that makes it look way > > better than the alternatives (including a generator, a mid-loop break, > > etc). > > Way better according to which criteria? IMO to realy make something like > this you wo

Re: New assignmens ...

2021-10-27 Thread Antoon Pardon
Op 27/10/2021 om 10:05 schreef Chris Angelico: On Wed, Oct 27, 2021 at 6:00 PM Antoon Pardon wrote: Op 26/10/2021 om 00:24 schreef Chris Angelico: TBH, I don't think there's a lot of value in multiple-assignment, since it has a number of annoying conflicts of syntax and few viable use-cas

Re: New assignmens ...

2021-10-27 Thread dn via Python-list
On 24/10/2021 22.23, O365 Dict wrote: > Well I have the following use case: > > while (temp_result := calculate_next_couple(a, b))[1]: > a, b = temp_result > more calculations > > Which IMO would be clearer if I could just write: > > while ((a, b) := calculate_next_couple

Re: New assignmens ...

2021-10-27 Thread Antoon Pardon
Op 27/10/2021 om 10:05 schreef Chris Angelico: On Wed, Oct 27, 2021 at 6:00 PM Antoon Pardon wrote: Op 26/10/2021 om 00:24 schreef Chris Angelico: TBH, I don't think there's a lot of value in multiple-assignment, since it has a number of annoying conflicts of syntax and few viable use-cas

Re: New assignmens ...

2021-10-27 Thread Chris Angelico
On Wed, Oct 27, 2021 at 6:00 PM Antoon Pardon wrote: > > > > Op 26/10/2021 om 00:24 schreef Chris Angelico: > > TBH, I don't think there's a lot of value in multiple-assignment, > > since it has a number of annoying conflicts of syntax and few viable > > use-cases. But if you have great examples o

Re: New assignmens ...

2021-10-27 Thread Antoon Pardon
Op 26/10/2021 om 00:24 schreef Chris Angelico: TBH, I don't think there's a lot of value in multiple-assignment, since it has a number of annoying conflicts of syntax and few viable use-cases. But if you have great examples of "x.y :=" or "x[y] :=", then by all means, post on python-ideas to p

Re: New assignmens ...

2021-10-26 Thread Antoon Pardon
Op 26/10/2021 om 19:46 schreef Schachner, Joseph: Why force unpacking? Why not assign a tuple? That would look like a simple assignment: x := (alpha, beta, gamma) And you could access x[0], x[1] and x[2]. I think asking := to support x, y := alpha, beta is a request to address an u

Re: New assignmens ...

2021-10-26 Thread Antoon Pardon
Op 25/10/2021 om 18:47 schreef Christman, Roger Graydon: Message: 8 Date: Mon, 25 Oct 2021 11:20:52 +0200 From: Antoon Pardon To: python-list@python.org Subject: Re: New assignmens ... Message-ID: <5761dd65-4e87-8b8c-1400-edb821204...@vub.be> Content-Type: text/plain; charset=utf-8;

RE: New assignmens ...

2021-10-26 Thread Schachner, Joseph
previously pointed out you can still just use = . --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Chris Angelico Sent: Monday, October 25, 2021 6:25 PM To: Python Subject: Re: New assignmens ... On Tue, Oct 26, 2021 at 9:19 AM dn via

Re: New assignmens ...

2021-10-26 Thread Antoon Pardon
Op 25/10/2021 om 23:03 schreef Chris Angelico: > On Tue, Oct 26, 2021 at 7:18 AM Antoon Pardon wrote: >> Op 25/10/2021 om 20:39 schreef Chris Angelico: >>> On Tue, Oct 26, 2021 at 5:35 AM Antoon Pardon wrote: By putting limits on the walrus code, you are not reducing complexity, you ar

RE: New assignmens ...

2021-10-25 Thread Avi Gross via Python-list
n-list On Behalf Of Stefan Ram Sent: Monday, October 25, 2021 12:57 PM To: python-list@python.org Subject: Re: New assignmens ... "Avi Gross" writes: >Now, yes, nobody needs a function to just add two numbers. If one uses a framework like "functools.reduce", the only way

Re: New assignmens ...

2021-10-25 Thread Chris Angelico
On Tue, Oct 26, 2021 at 9:19 AM dn via Python-list wrote: > Back on-topic, I am slightly curious:- > > aside from 'starting small' with an option to widen/'open-up' later, is > there a particular reason why 'the walrus' has not been made available > (could not be ...?) for use with object-attribut

Re: New assignmens ...

2021-10-25 Thread dn via Python-list
On 26/10/2021 10.45, Chris Angelico wrote: > On Tue, Oct 26, 2021 at 8:42 AM Avi Gross via Python-list > wrote: >> Personally, I don't care what is done and suspect I will rarely feel much >> need to use the current walrus operator, let alone an enhanced Odobenus >> rosmarus operator like ::== ...

Re: New assignmens ...

2021-10-25 Thread Chris Angelico
On Tue, Oct 26, 2021 at 8:42 AM Avi Gross via Python-list wrote: > Personally, I don't care what is done and suspect I will rarely feel much > need to use the current walrus operator, let alone an enhanced Odobenus > rosmarus operator like ::== ... > . wait what? Ah. Had to look that one up.

RE: New assignmens ...

2021-10-25 Thread Avi Gross via Python-list
anced Odobenus rosmarus operator like ::== ... -Original Message- From: Python-list On Behalf Of Christman, Roger Graydon Sent: Monday, October 25, 2021 12:48 PM To: python-list@python.org Subject: Re: New assignmens ... Message: 8 Date: Mon, 25 Oct 2021 11:20:52 +0200 From: Antoon Pardo

Re: New assignmens ...

2021-10-25 Thread Chris Angelico
On Tue, Oct 26, 2021 at 7:18 AM Antoon Pardon wrote: > > Op 25/10/2021 om 20:39 schreef Chris Angelico: > > On Tue, Oct 26, 2021 at 5:35 AM Antoon Pardon wrote: > >> By putting limits on the walrus code, you are not reducing complexity, you > >> are increasing it. > >> You are increasing complex

Re: New assignmens ...

2021-10-25 Thread Antoon Pardon
Op 25/10/2021 om 20:39 schreef Chris Angelico: > On Tue, Oct 26, 2021 at 5:35 AM Antoon Pardon wrote: >> By putting limits on the walrus code, you are not reducing complexity, you >> are increasing it. >> You are increasing complexity because you can't just reuse the code that >> handles an ordi

Re: New assignmens ...

2021-10-25 Thread Chris Angelico
On Tue, Oct 26, 2021 at 5:35 AM Antoon Pardon wrote: > By putting limits on the walrus code, you are not reducing complexity, you > are increasing it. > You are increasing complexity because you can't just reuse the code that > handles an ordinary > assignment. You now need specific code to limi

Re: New assignmens ...

2021-10-25 Thread Antoon Pardon
Op 25/10/2021 om 18:06 schreef Avi Gross via Python-list: > Antoon, > > Just to be clear. I am talking about a different measure of efficiency. No you are not. > > The topic here is the Python run-time parser though. Yes and that is what I am talking about. > It is reading your code > and doin

Re: New assignmens ...

2021-10-25 Thread Chris Angelico
On Tue, Oct 26, 2021 at 3:07 AM Avi Gross via Python-list wrote: > I will end with this. If someone wants to design a new language from scratch > and with a goal of starting with as general a set of concepts as they can, > fine. Design it carefully. Build it and if it works well enough, use it. I

Re: New assignmens ...

2021-10-25 Thread Christman, Roger Graydon
Message: 8 Date: Mon, 25 Oct 2021 11:20:52 +0200 From: Antoon Pardon To: python-list@python.org Subject: Re: New assignmens ... Message-ID: <5761dd65-4e87-8b8c-1400-edb821204...@vub.be> Content-Type: text/plain; charset=utf-8; format=flowed On 25/10/2021 11:20, Anton Pardon wrote: >

RE: New assignmens ...

2021-10-25 Thread Avi Gross via Python-list
paste operation for the more complex scenarios even if they remember the fancy version exists and is bound to some forgotten series of keys clicked together like control-X control-alt-t or something. -Original Message- From: Python-list On Behalf Of Antoon Pardon Sent: Monday, October 2

Re: New assignmens ...

2021-10-25 Thread Antoon Pardon
On 25/10/2021 01:46, Avi Gross via Python-list wrote: No, many things need not be as general as possible once you consider how much work it may take to develop code and how many bugs and oddities might be introduced and even how much it may slow the interpreter. ... I imagine you can create som

RE: New assignmens ...

2021-10-24 Thread Avi Gross via Python-list
need to check your version of Python to see if the feature exists before ... -Original Message- From: Python-list On Behalf Of Alan Bawden Sent: Sunday, October 24, 2021 3:53 AM To: python-list@python.org Subject: Re: New assignmens ... It seemed weird to me that only an identifier was

Re: New assignmens ...

2021-10-24 Thread Chris Angelico
On Mon, Oct 25, 2021 at 2:13 AM Alan Bawden wrote: > > It seemed weird to me that only an identifier was allowed to be the > target of an assignment expression. Then it occurred to me that > function definitions are another place where only identifiers are > allowed, but where I could imagine an

  1   2   3   4   5   6   7   8   9   10   >