Re: [Python-ideas] Internal function idea

2017-12-29 Thread Stephen J. Turnbull
On Sat, Dec 23, 2017, 09:23 William Rose, wrote: > I had an idea that it could be helpful to have local functions as > well as normal ones. They would be called the same way as normal > ones but def would be replaced by internal and inside they could > only access variables they have defined

Re: [Python-ideas] Internal function idea

2017-12-29 Thread Chris Angelico
On Fri, Dec 29, 2017 at 5:03 PM, Franklin? Lee wrote: > On Fri, Dec 29, 2017 at 1:01 AM, Chris Angelico wrote: >> On Fri, Dec 29, 2017 at 1:31 PM, Franklin? Lee >> wrote: >>> On Thu, Dec 28, 2017 at 5:21 AM, William Rose >>> wrote: I agree with the point that it should allow builtin but t

Re: [Python-ideas] Internal function idea

2017-12-28 Thread Franklin? Lee
On Fri, Dec 29, 2017 at 1:01 AM, Chris Angelico wrote: > On Fri, Dec 29, 2017 at 1:31 PM, Franklin? Lee > wrote: >> On Thu, Dec 28, 2017 at 5:21 AM, William Rose >> wrote: >>> I agree with the point that it should allow builtin but the main purpose of >>> it is to not allow global variables >>

Re: [Python-ideas] Internal function idea

2017-12-28 Thread Chris Angelico
On Fri, Dec 29, 2017 at 1:31 PM, Franklin? Lee wrote: > On Thu, Dec 28, 2017 at 5:21 AM, William Rose > wrote: >> I agree with the point that it should allow builtin but the main purpose of >> it is to not allow global variables > > But functions are also accessed using global names. What is you

Re: [Python-ideas] Internal function idea

2017-12-28 Thread Franklin? Lee
On Thu, Dec 28, 2017 at 5:21 AM, William Rose wrote: > I agree with the point that it should allow builtin but the main purpose of > it is to not allow global variables But functions are also accessed using global names. What is your answer to the potential problem of programmers being reluctant

Re: [Python-ideas] Internal function idea

2017-12-26 Thread Franklin? Lee
On Sat, Dec 23, 2017, 09:23 William Rose, wrote: > > I had an idea that it could be helpful to have local functions as well as > normal ones. They would be called the same way as normal ones but def would > be replaced by internal and inside they could only access variables they > have defined and

Re: [Python-ideas] Internal function idea

2017-12-26 Thread Brett Cannon
[removing Python-ideas-owner so any replies don't flood my inbox] On Sat, Dec 23, 2017, 09:23 William Rose, wrote: > I had an idea that it could be helpful to have local functions as well as > normal ones. They would be called the same way as normal ones but def would > be replaced by internal a