Re: for convenience

2022-03-24 Thread Avi Gross via Python-list
for a programming class and it definitely would have been much easier to do in Python. -Original Message- From: Chris Angelico To: python-list@python.org Sent: Thu, Mar 24, 2022 7:57 pm Subject: Re: for convenience On Fri, 25 Mar 2022 at 10:44, Avi Gross wrote: > But would it

Re: for convenience

2022-03-24 Thread Avi Gross via Python-list
xample, which I sometimes use in my programming, literally jumps out of the initial language. -Original Message- From: Chris Angelico To: python-list@python.org Sent: Thu, Mar 24, 2022 1:37 pm Subject: Re: for convenience On Fri, 25 Mar 2022 at 04:15, Avi Gross via Python-list wrote: &g

Re: for convenience

2022-03-24 Thread Chris Angelico
On Fri, 25 Mar 2022 at 10:44, Avi Gross wrote: > But would it be helpful? Maybe. I am thinking back to decades ago when I > did C and C++ programming and how we used it. It was way more that just: > > #DEFINE TIMEZONE 5 > > The above use is sort of to create a constant. What we often used was ways

Re: for convenience

2022-03-24 Thread Avi Gross via Python-list
Original Message- From: Chris Angelico To: python-list@python.org Sent: Thu, Mar 24, 2022 1:37 pm Subject: Re: for convenience On Fri, 25 Mar 2022 at 04:15, Avi Gross via Python-list wrote: > Python made lots of choices early on and then tried to graft on ever more > features

Re: for convenience

2022-03-24 Thread Chris Angelico
On Fri, 25 Mar 2022 at 06:05, Grant Edwards wrote: > > On 2022-03-24, Chris Angelico wrote: > > > No, I would say that a preprocessor of that sort isn't necessary to a > > Python-like language. If you really want one, it's honestly not that > > hard to do; remember, "preprocessor" means that it p

Re: for convenience

2022-03-24 Thread Grant Edwards
On 2022-03-24, Chris Angelico wrote: > No, I would say that a preprocessor of that sort isn't necessary to a > Python-like language. If you really want one, it's honestly not that > hard to do; remember, "preprocessor" means that it processes the > source code before the main language sees it, so

Re: for convenience

2022-03-24 Thread Chris Angelico
On Fri, 25 Mar 2022 at 04:15, Avi Gross via Python-list wrote: > Python made lots of choices early on and then tried to graft on ever more > features, sometimes well and sometimes not optimally. The same is true > for so many other languages. A carefully designed new language built now > might ana

Re: for convenience

2022-03-24 Thread Avi Gross via Python-list
se it is what it is so get over it! -Original Message- From: Paul St George To: python-list@python.org Sent: Thu, Mar 24, 2022 6:31 am Subject: Re: for convenience On 22/03/2022 18.04, dn wrote: > and thank you - it is refreshing, if not enervating, to receive feedback &

Re: for convenience

2022-03-24 Thread Paul St George
On 22/03/2022 18.04, dn wrote: > and thank you - it is refreshing, if not enervating, to receive feedback > on efforts-expended! > > You will also notice, that now you understand the id() stuff, the > tag-team effect between @Chris and I (which we have often played, albeit > not by-design), now m

Re: for convenience

2022-03-22 Thread Avi Gross via Python-list
It is not a convenience but a portable way to keep track of your current location. It keeps changing. And, in some cases, you retreat back and follow a nextleft or nextright pointer of sorts. In examples like that, the construct is not for convenience but simply because it makes no sense to approach a

Re: for convenience

2022-03-22 Thread dn
;>>> Here’s my question: >>>> >>>> When I forget to use the convenient shorter form >>>> >>>> why is bpy.context not interpreted as bpy.bpy.context? >>>> >>> >>> I don't understand the question. When you do

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
form > >> > >> why is bpy.context not interpreted as bpy.bpy.context? > >> > > > > I don't understand the question. When you do that "for convenience" > > assignment, what you're doing is creating a local variable named > > &

Re: for convenience

2022-03-21 Thread dn
only need to write context >> >> >> Here’s my question: >> >> When I forget to use the convenient shorter form >> >> why is bpy.context not interpreted as bpy.bpy.context? >> > > I don't understand the question. When you do that "for conveni

Re: for convenience

2022-03-21 Thread Cameron Simpson
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: > >When I forget to use the convenient shorter form > >why is bpy.conte

Re: for convenience

2022-03-21 Thread Avi Gross via Python-list
r 21, 2022 5:17 pm Subject: Re: for convenience 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  # convenience > > then whenever I need bpy.context, I only need to write context >

Re: for convenience

2022-03-21 Thread Paul Bryan
No, nor did I suggest that you did. `context` is presumably an attribute in the `bpy` module, for which you are creating a `context` attribute in your module. On Mon, 2022-03-21 at 22:31 +0100, Paul St George wrote: > Hi, > I do not (knowingly) have a module called ‘context'. > > > > > > On 21

Re: for convenience

2022-03-21 Thread Paul St George
Hi, I do not (knowingly) have a module called ‘context'. > On 21 Mar 2022, at 22:24, Paul Bryan wrote: > > Assuming `bpy` is a module, you're creating a new attribute in your module, > `context`, that contains a reference to the same object that is referenced in > the `context` attribute in

Re: for convenience

2022-03-21 Thread Paul Bryan
Assuming `bpy` is a module, you're creating a new attribute in your module, `context`, that contains a reference to the same object that is referenced in the `context` attribute in the `bpy` module. On Mon, 2022-03-21 at 22:12 +0100, Paul St George wrote: > > When I am writing code, I often do th

Re: for convenience

2022-03-21 Thread Chris Angelico
t to use the convenient shorter form > > why is bpy.context not interpreted as bpy.bpy.context? > I don't understand the question. When you do that "for convenience" assignment, what you're doing is creating a local variable named "context" which refers to

for convenience

2022-03-21 Thread Paul St George
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: When I forget to use the convenient shorter form why is bpy.context not interpreted as bpy.bpy.context? — Paul St Ge