Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread David Mertz
When did you last read the Dijkstra paper. It's short and he explains very well why exactly all the constructs you mention are unlike Goto. This isn't a proposal to subroutines, it's a proposal for subroutines in which all lexically scoped variables are implicitly nonlocal. That's basically Goto,

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Steven D'Aprano
On Wed, Aug 15, 2018 at 08:35:35PM -0400, David Mertz wrote: > Goto considered harmful. Fortunately this proposal has nothing to do with goto. Elazar is correct that its a kind of subroutine call, just like an ordinary function call, except the scoping rules are different. And for the record,

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Abe Dillon
[Jacob Solinsky] > these local variables are used quite often in the mutate methods, of which > there are several dozen, so storing them by default saves a lot of typing. There are several things you can do to alleviate the typing problem: 1) Get an IDE that has auto-complete. I recommend

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread Greg Ewing
Alexandre Brault wrote: On 2018-08-15 03:32 PM, MRAB wrote: On 2018-08-15 18:27, MRAB wrote: > While we're at it, what's the only creature that's known commonly and only by its scientific name? I would have guessed Tyrannosaurus Rex I would have thought pretty much any dinosaur. -- Greg

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Steven D'Aprano
On Wed, Aug 15, 2018 at 01:52:27PM -0500, Jacob Solinsky wrote: > -Jumping to a function as opposed to calling a function > > When a function is jumped to, it inherits the variables in the > caller’s local namespace and is free to modify them or add new local > variables, unlike a normal

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Elazar
I have no opinion on the proposal, but the equation with goto is dead wrong. Yes, technically this is a goto. But so is a regular function call. Jumping to a function makes thd code _easier_ to reason about, statically, not harder. When you call an arbitrary function, you have no idea whether it

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Eric Fahlgren
How about just https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf On Wed, Aug 15, 2018 at 5:38 PM David Mertz wrote: > Hmm.. link broke. Is this right? > > >

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread David Mertz
Hmm.. link broke. Is this right? https://www.google.com/url?sa=t=web=j=https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf=2ahUKEwi8lqHYqfDcAhXImOAKHeAzDmsQFjAEegQIBhAB=AOvVaw1CZug_36-PbevItYXTb7SR On Wed, Aug 15, 2018, 8:35 PM David Mertz wrote: > Goto considered harmful. > > >

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread David Mertz
Goto considered harmful. https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf=2ahUKEwi8lqHYqfDcAhXImOAKHeAzDmsQFjAEegQIBhAB=AOvVaw1CZug_36-PbevItYXTb7SR On Wed, Aug 15, 2018, 3:52 PM Jacob Solinsky wrote: > -Jumping to a function as opposed to calling a function > > When a function

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Chris Angelico
On Thu, Aug 16, 2018 at 8:53 AM, Jacob Solinsky wrote: > What I had hoped to do was use a preamble code block to collect all of the > most common queries called by the mutate function in the local namespace, > for example > > C = 'bpgkdtszSZjCmnywh' > M = 'mn' > > > class Morpheme: > #stuff >

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Jacob Solinsky
What I had hoped to do was use a preamble code block to collect all of the most common queries called by the mutate function in the local namespace, for example C = 'bpgkdtszSZjCmnywh' M = 'mn' class Morpheme: #stuff def preamble(self): ps = self.precedingmorpheme.form ss =

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Abe Dillon
Sorry for the double post, but I wanted to make sure you saw my original misplaced post: Jumping into functions that mutate variables in the calling scope sounds a lot like "GoTo" which is notorious for leading to code that's very hard to reason

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Abe Dillon
[Chris Angelico] > Drop the word "function" and it's no longer about a goto - it's about > a block of code that can be deposited into another context. The only context I've used goto is in a TI-83 scientific calculator, but in that, it was just about jumping around to different labels in code

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Chris Angelico
On Thu, Aug 16, 2018 at 7:40 AM, Abe Dillon wrote: > Jumping into functions that mutate variables in the calling scope sounds a > lot like "GoTo" which is notorious for leading to code that's very hard to > reason about. Your functions would implicitly require that you assign > variables in the

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Abe Dillon
Jumping into functions that mutate variables in the calling scope sounds a lot like "GoTo" which is notorious for leading to code that's very hard to reason about. Your functions would implicitly require that you assign variables in the calling

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Chris Angelico
On Thu, Aug 16, 2018 at 4:52 AM, Jacob Solinsky wrote: > -Jumping to a function as opposed to calling a function > > When a function is jumped to, it inherits the variables in the caller’s local > namespace and is free to modify them or add new local variables, unlike a > normal function call,

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Jonathan Fine
Hi Jacob Thank you for your problem. I'll focus on your simple example (lightly edited for clarity) > Let foo(a, b) be the syntax to call foo(a, b), and foo(a, b)% be the syntax > to jump to foo(a, b) > > c = 5 > > def foo(a): > return a + c > > def bar(a, c): > return foo(a) >

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread Alexandre Brault
On 2018-08-15 03:32 PM, MRAB wrote: > On 2018-08-15 18:27, MRAB wrote: >> On 2018-08-15 09:17, Jonathan Fine wrote: >>> Steve Barnes and Greg Ewing wrote: >>> >   * A dinosaur is specifically an extinct terrible (formerly > considered) > lizard Which technically is not

[Python-ideas] Jump to function as an an alternative to call function

2018-08-15 Thread Jacob Solinsky
-Jumping to a function as opposed to calling a function When a function is jumped to, it inherits the variables in the caller’s local namespace and is free to modify them or add new local variables, unlike a normal function call, wherein the caller’s namespace is inaccesible. At present, the

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread MRAB
On 2018-08-15 18:27, MRAB wrote: On 2018-08-15 09:17, Jonathan Fine wrote: Steve Barnes and Greg Ewing wrote: * A dinosaur is specifically an extinct terrible (formerly considered) lizard Which technically is not a lizard. I can't resist. Puffinus puffinus is the scientific name for

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread Danilo J. S. Bellini
On 14 August 2018 at 16:42, Michael Selik wrote: > In my own experience teaching, I find that many concepts are easier to > introduce if I avoid the Python jargon until after I've explained what it > does. [...] > "until after" != "forever". A jargon might be just an acronym, a word or few

Re: [Python-ideas] Python docs page: In what ways is None special

2018-08-15 Thread Jonathan Fine
Hi Thank you all, for the kind words and appreciation, and the comments and suggestions. I have time now to respond to one comment. Please note that is just my opinion, and your opinion may be different. Rhodri James prefers

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread MRAB
On 2018-08-15 09:17, Jonathan Fine wrote: Steve Barnes and Greg Ewing wrote: * A dinosaur is specifically an extinct terrible (formerly considered) lizard Which technically is not a lizard. I can't resist. Puffinus puffinus is the scientific name for (drum roll) no, not the Atlantic

Re: [Python-ideas] Python docs: page: In what ways in None special

2018-08-15 Thread Chris Barker via Python-ideas
Since I already spent a bunch of time on this, I did a PR: https://github.com/jfine2358/py-jfine2358/pull/2 further discussion should probably be in that PR / repo -CHB On Wed, Aug 15, 2018 at 9:02 AM, Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: > > None is keyword, and just

Re: [Python-ideas] Python docs: page: In what ways in None special

2018-08-15 Thread Chris Barker - NOAA Federal via Python-ideas
> None is keyword, and just like any other keyword, it can't be re-bound. >> it's only a keyword because Python doesn't otherwise have a way of creating >> non-rebindable names. It's purpose is to represent the singular object of >> NoneType, and in that sense it's a literal as much as [] or

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread Greg Ewing
Jonathan Fine wrote: Puffinus puffinus is the scientific name for Puff the Magic Dragon? -- Greg ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct:

Re: [Python-ideas] Python docs: page: In what ways in None special

2018-08-15 Thread Rhodri James
On 15/08/18 00:09, Chris Barker wrote: On Tue, Aug 14, 2018 at 10:45 AM, Rhodri James wrote: On 'None is a constant': Erm. I think you've got carried away with simplifying this and gone down a blind alley. None is a literal, and like any other literal can't be rebound. no, it's not --

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread Rhodri James
On 15/08/18 06:21, Steve Barnes wrote: The English language has, historically, always borrowed, co-opted and sometimes perverted words from other languages to allow distinct concepts to be expressed concisely - which I personally, (admittedly as a native speaker), find rather useful. I think

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread Jonathan Fine
Steve Barnes and Greg Ewing wrote: >> * A dinosaur is specifically an extinct terrible (formerly considered) >> lizard > > > Which technically is not a lizard. I can't resist. Puffinus puffinus is the scientific name for (drum roll) no, not the Atlantic (or common) Puffin but (off-pitch

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread Greg Ewing
Steve Barnes wrote: * Brakes are used to apply breaking, I hope they actually apply braking, not breaking. :-) * A dinosaur is specifically an extinct terrible (formerly considered) lizard Which technically is not a lizard. -- Greg ___

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread Michael Selik
On Wed, Aug 15, 2018, 12:06 AM Stefan Behnel wrote: > Michael Selik schrieb am 14.08.2018 um 21:42: > > This is supported by education research. Some light Googling found a > > study on the topic [0] that is consistent with my own observations. > > OTx2, and no offence, but … this is supported

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread Stefan Behnel
Michael Selik schrieb am 14.08.2018 um 21:42: > This is supported by education research. Some light Googling found a > study on the topic [0] that is consistent with my own observations. OTx2, and no offence, but … this is supported by research as well. People tend to search just long enough to