[Python-ideas] Reverse polish notation

2021-04-02 Thread John
It occurs to me it's a syntax error everywhere to put two potentially-calculable terms in a row with nothing between them, e.g.: ```python a = b c mylist = [x 6 for x in y if "a" in x] ``` Unless I'm missing something, this makes it relatively easy (from a syntax perspective; writing a pa

[Python-ideas] Re: Reverse polish notation

2021-04-02 Thread John
True. It gets ambiguous when doing n*(-(x + y)) i.e. n x y + - * (fail). The simplest solution is n 0 x y + - * I can't actually think of any other unary operators. On Fri, Apr 2, 2021 at 10:54 AM Richard Damon wrote: > > One problem with trying to mix RPN with in-fix is that some operators, >

[Python-ideas] Re: Reverse polish notation

2021-04-02 Thread John
ure if a type could define its own unary+ to do > > something special, but I thought it could. > > > The Counter class from the collections module has a special use for unary +. > > > On 4/2/21 11:19 AM, John wrote: > >> True. It gets ambiguous when doing n*(-(x + y)) i.e. n

[Python-ideas] Re: Reverse polish notation

2021-04-02 Thread John
knocks over the other 6,000. It's at least generating interesting discussion. On Fri, Apr 2, 2021 at 12:58 PM Chris Angelico wrote: > > On Sat, Apr 3, 2021 at 3:49 AM John wrote: > > > > These are good points. > > > > I would suggest the unary - creates ser

[Python-ideas] Re: Reverse polish notation

2021-04-02 Thread John
point is salient. On Fri, Apr 2, 2021 at 10:16 PM Christopher Barker wrote: > > Having both RPN and infix in one language seems like a verb as idea to me. > But anyway: > > > > On Fri, Apr 2, 2021 at 11:22 AM John wrote: >> >> RPN is considered >> less prone t

[Python-ideas] Re: Reverse polish notation

2021-04-02 Thread John
gt; Along the way, I've understood each part, and its relationship with > the rest of the computation. b/c+f)%d)*e)**((g-h)/2))) The fundamental point you seem to miss is that Python code (or other languages) is READ a hundred times as often as it is written. Readability counts! On

[Python-ideas] Re: Reverse polish notation

2021-04-03 Thread John
On Sat, Apr 3, 2021 at 1:03 AM Greg Ewing wrote: > > On 3/04/21 5:07 pm, John wrote: > > This fails when it's like b*((x*2^(3-a))-(7*c)), since > > you now have to look back and forth and get a handle on what each of > > the terms is. b x 2 3 a - ** * 7 c * - * is p

[Python-ideas] Re: Reverse polish notation

2021-04-03 Thread John
On Sat, Apr 3, 2021 at 5:26 AM Stephen J. Turnbull wrote: > > Alexandre Brault writes: > > On 2021-04-03 12:07 a.m., John wrote: > > > >> Visually this means I can identify each particular operation and its > > >> relationship with the next ter

[Python-ideas] Re: Reverse polish notation

2021-04-03 Thread John
Here's a question: is it possible to implement this with a Python module, or is that absolutely not a thing that can be done? I've seen some odd things done with modules. On Sat, Apr 3, 2021 at 8:46 AM John wrote: > > On Sat, Apr 3, 2021 at 5:26 AM Stephen J. T

[Python-ideas] Re: Less is more? Smaller code and data to fit more into the CPU cache?

2022-03-27 Thread John
Look up Judy arrays. Specialized data structure for this. It's got a simple API, but it's incredibly complex and architecture-specific under the hood. People are always trying to optimize, but there are limits to how much you can do on generic data structures (and how much you can do in general),

[Python-ideas] Re: Context managers in expressions

2021-10-30 Thread John Sturdy
value-returning form of try... except... But perhaps the two of them together are too much of a change. John On Mon, Oct 25, 2021 at 10:03 PM Mark Gordon wrote: > What should happen if the context manager attempts to suppress a raised > exception? In cases where you applied the context ma

[Python-ideas] Re: Limit scope of variables using round brackets

2022-01-17 Thread John Sturdy
be easy for those coming to Python from various other popular languages, and I don't think it would be confusing to those learning Python as their first programming language --- the teacher / course writer could just pick either and stick with it. John On Mon, Jan 17, 2022 at 10:1

[Python-ideas] Re: Limit scope of variables using round brackets

2022-01-17 Thread John Sturdy
in C and many other languages. It would be possible to add another statement type just for this, I suppose, and have "let x = y in:" and a suite under it. On Mon, Jan 17, 2022 at 5:24 PM Christopher Barker wrote: > On Mon, Jan 17, 2022 at 7:36 AM John Sturdy wrote: > >> F

[Python-ideas] Re: Limit scope of variables using round brackets

2022-01-17 Thread John Sturdy
This is clearly one for me to abandon! Thanks for the explanations. John On Mon, Jan 17, 2022 at 7:04 PM Paul Moore wrote: > On Mon, 17 Jan 2022 at 18:51, John Sturdy wrote: > > > > My idea is to support the style in which each variable comes into > existence at a single

[Python-ideas] Allowing non-ASCII bracket and quote characters in source code

2022-01-17 Thread John Sturdy
Perhaps the time isn't ripe for this, and perhaps it never will be, but UTF8 seems to be handled by just about everything these days. I suspect this is a crazy suggestion, but on the other hand perhaps people looking back from 2100 will think "It was crazy that they stuck exclusively with ASCII sy

[Python-ideas] Re: Allowing non-ASCII bracket and quote characters in source code

2022-01-18 Thread John Sturdy
On Tue, Jan 18, 2022 at 1:15 AM Steven D'Aprano wrote: > I would be more sympathetic to this idea if: > > 2. I had a guarantee that all of the bracket characters would be both > available and easily distinguishable in any typeface I used. > I don't think the "distinguishable" part matters that m

[Python-ideas] Sildenafil is the best medicine to cure ED issues

2019-07-05 Thread John Brown
At the sensual mixing state, nitric oxide starts getting free from the man's body that makes and spare cGMP in his hot organ. Finally, penile muscles get broaden and speed of blood is augmented due to unwinding and extension of male penile channels. Therefore, a man finally gets a hard and suffe

[Python-ideas] Re: Start argument for itertools.accumulate() [Was: Proposal: A Reduce-Map Comprehension and a "last" builtin]

2019-07-07 Thread john alexa
Java is a oops concept supported language and one of the most famous programming languages for computer science students and learners. Most students look for trusted and reliable Java Programming Help to complete Java projects without any hassles. https://www.greatassignmenthelp.com/java-assignm

[Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread John Torakis
ality from their early days (day one?). Python development can be greatly improved if a "try before pip installing" mechanism gets in place, as it will add a lot to the REPL nature of the testing/experimenting process. Thank you for your time, John Torakis, IT Security Researcher P.S: It

Re: [Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread John Torakis
On 23/08/2017 20:36, John Torakis wrote: > Yeah, I am a security researcher, I am keen on backdoor programming and > staging and all that! It is my official job and research topic! I go to > the office and code such stuff! I am not a blackhat, nor a security > enthusiast,

Re: [Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread John Torakis
Bounced back on list Forwarded Message Θέμα: Re: [Python-ideas] Remote package/module imports through HTTP/S Ημερομηνία: Wed, 23 Aug 2017 20:36:19 +0300 Από:John Torakis Προς: Chris Angelico Yeah, I am a security researcher, I am keen on backdoor programming

Re: [Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread John Torakis
On 23/08/2017 21:04, Bruce Leban wrote: > > On Wed, Aug 23, 2017 at 10:37 AM, John Torakis <mailto:[email protected]>> wrote: > > > Github can be trusted 100% percent for example. > > > This isn't even remotely close to true. While I'd agre

Re: [Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread John Torakis
On 23/08/2017 20:49, Chris Angelico wrote: > On Thu, Aug 24, 2017 at 3:37 AM, John Torakis wrote: >> >> On 23/08/2017 20:36, John Torakis wrote: >>> Yeah, I am a security researcher, I am keen on backdoor programming and >>> staging and all that! It is my offi

Re: [Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread John Torakis
On 23/08/2017 21:11, Chris Angelico wrote: > On Thu, Aug 24, 2017 at 4:04 AM, Bruce Leban wrote: >> On Wed, Aug 23, 2017 at 10:37 AM, John Torakis >> wrote: >>> >>> Github can be trusted 100% percent for example. >> >> This isn't even remotely

Re: [Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread John Torakis
On 23/08/2017 21:24, Paul Moore wrote: > On 23 August 2017 at 18:49, Chris Angelico wrote: >> Still -1 on this becoming a stdlib package, as there's nothing I've >> yet seen that can't be done as a third-party package. But it's less >> scary than I thought it was :) > IMO, this would make a grea

Re: [Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread John Torakis
On 23/08/2017 21:41, Guido van Rossum wrote: > This isn't ever going to be a standard feature. It's available as a > third-party package and that's fine. > > I'd like to add a historic note -- this was first proposed around 1995 > by Michael McLay. (Sorry, I don't have an email sitting around, bu

Re: [Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread John Torakis
ke this module acceptable for stdlib, please let me know! I'd more than happily reform it and make it comply with Python stdlib requirements. John Torakis On 23/08/2017 21:48, Guido van Rossum wrote: > For security reasons. AFAIK HTTPS wasn't even invented at the time. > > On

Re: [Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread John Torakis
On 23/08/2017 22:06, Chris Angelico wrote: > On Thu, Aug 24, 2017 at 5:04 AM, John Torakis wrote: >> Dark times... >> >> So is it a "case closed", or is there any improvement that will make it >> worth it to be an stdlib module? >> >> I mean, tim

[Python-ideas] Addition to fnmatch.py

2022-06-05 Thread John Carter
essions when prompted by my code. I would like to propose that split, even though it is very simple, be included in the 'fnmatch' module. John *a is the original and b is those that match. ___ Python-ideas mailing list -- python-ideas@pyt

[Python-ideas] Re: Addition to fnmatch.py

2022-06-06 Thread John Carter
uplicates in the test data. Order is only checked correctly if thee are the same number of elements in the test and reference lists I also tried more_itertoolls.partition. Nearly 4 times slower. John ___ Python-ideas mailing list -- [email protected]

Re: [Python-ideas] From mailing list to GitHub issues

2016-08-13 Thread John Wong
d folks forget to branch off so off topic discussion end up polluting the thread. As a reader, I am tired of that. Thanks. John [1]: https://www.reddit.com/r/rust/comments/2tdqgc/rustdev_say_goodbye_to_the_mailing_list/ ___ Python-ideas mailing list