Re: convenience

2022-03-22 Thread Avi Gross via Python-list
Greg, Yes, what I describe may not be common and some code goes to serious lengths precisely to make direct connections to internals on an object hard to access. But Python indeed allows and perhaps encourages you to use what you consider side effects but perhaps more. There are many dunder meth

Re: Reducing "yield from" overhead in recursive generators

2022-03-22 Thread Greg Ewing
On 23/03/22 11:44 am, Rathmann wrote: So that sounds like the original CPython implementation had an O(depth) component, but with a lower constant factor than the current version? Yes, but so much lower that I would expect it to be unmeasurable. -- Greg -- https://mail.python.org/mailman/list

Re: convenience

2022-03-22 Thread Greg Ewing
On 23/03/22 7:00 am, Avi Gross wrote: But are there costs or even errors if you approach an inner part of an object directly? Can there be dunder methods not invoked that would be from the standard approach? What kind of inadvertent errors can creep in? The attribute could be a property that r

Re: for convenience

2022-03-22 Thread Avi Gross via Python-list
I sent George a private reply as discussing other languages gets rapidly off-topic. I want to add a small addendum here about the technique he used and a Dave Neal and others are trying, a way to imagine things that is more compatible with how a language like Python works so it meets expectation.

Re: Reducing "yield from" overhead in recursive generators

2022-03-22 Thread Rathmann
> On 19 Mar 2022, at 03:07, Greg Ewing wrote: > > On 19/03/22 9:40 am, Rathmann wrote: >> The other challenge/question would be to see if there is a way to implement >> this basic approach with lower overhead. > > My original implementation of yield-from didn't have this problem, > because it did

Re: for convenience

2022-03-22 Thread dn
On 23/03/2022 09.23, Paul St George wrote: > On 21/03/2022 18.04, dn wrote: > >> On 22/03/2022 10.17, Chris Angelico wrote: >>> On Tue, 22 Mar 2022 at 08:13, Paul St George >> > wrote: When I am writing code, I often do things li

Re: for convenience

2022-03-22 Thread Paul St George
On 21/03/2022 17.47, Avi Gross wrote: > So, I ask Paul what other language than python he has used before, just out > of curiosity. The other language I have used (and often) is Processing. Before that, and a long time ago, Lingo. — Paul -- https://mail.python.org/mailman/listinfo/pyth

Re: for convenience

2022-03-22 Thread Paul St George
On 21/03/2022 18.02, Cameron Simpson wrote: > On 21Mar2022 22:12, Paul St George wrote: > >When I am writing code, I often do things like this: > > > >context = bpy.context # convenience > > > >then whenever I need bpy.context, I only need to write context > > > > > >Here’s my question: > > > >W

Re: for convenience

2022-03-22 Thread Paul St George
On 21/03/2022 18.04, dn wrote: > On 22/03/2022 10.17, Chris Angelico wrote: > > On Tue, 22 Mar 2022 at 08:13, Paul St George > > wrote: > >> > >> > >> When I am writing code, I often do things like this: > >> > >> context = bpy.context # conv

Difficulty in installing Python

2022-03-22 Thread Reuel Lewis
Hello, I'm trying to install Python as I'd like to learn it. I'm a newbie in all things related to software programming. I have Windows 10 installed on my HP laptop. I tried to install Python but I didn't Click on the 'Add python 3.10 to path'. So I tried to uninstall it and install Python once mor

convenience

2022-03-22 Thread Avi Gross via Python-list
An earlier post talked about a method they used for "convenience" in a way they apparently did not understand and many of us educated them, hopefully. That made me wonder of teh impact on our code when we use various forms of convenience. Is it convenient for us as programmers, other potential re