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

2018-08-17 Thread Brice Parent
Le 16/08/2018 à 20:34, Steven D'Aprano a écrit : On Thu, Aug 16, 2018 at 10:31:28AM +0200, Brice Parent wrote: If I understand well the need (I'm unsure I've had it myself), it would be easier to be able to import the function in the active context, like this: def foo(a):     return a + c

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

2018-08-17 Thread Jonathan Fine
Jacob Solinsky wrote: > So when getx is executed inside a let form, if it tries to read/write the > value of X it interacts with the X entry in the let form's symbol table > before moving to find X in the global environment, right? The context for this is two (very useful) URLs I sent him off lis

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

2018-08-17 Thread Chris Barker via Python-ideas
On Thu, Aug 16, 2018 at 12:37 PM, Chris Angelico wrote: > > I've no idea what interpreter you're using, but it doesn't work for me. > That was in iPython, with python3.6.2 -- I wouldn't have expected it to be different in this case though -- really odd. OK -- tired again, and it indeed it faile

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

2018-08-17 Thread Abe Dillon
Jacob, can you please describe in greater detail *what* you're trying to accomplish with your morpheme code? Not *how* you wish to accomplish it, but *what* the code is supposed to do? I've looked into other projects that try to model morphemes and similar language constructs to get a better idea

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

2018-08-17 Thread Jacob Solinsky
The code does the following 2 things: A Verb class assembles the necessary morphemes in order in accordance with the verb's subject, object, mode, grmamatical order, tense and polarity. If all of the morphemes' default forms were mashed together at this point a valid Ojibwe verb form would not be

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

2018-08-17 Thread Chris Barker - NOAA Federal via Python-ideas
By the way— really kludgy, doesn’t exec() do what you want here: Note The default *locals* act as described for function locals() below: modifications to the default *locals* dictionary should not be attempted. Pass an explicit *locals*di

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

2018-08-17 Thread Abe Dillon
Is "Ban" a class of morphemes or just a single morpheme? I would think subclasses of Morpheme would be "Bound" and "Unbound" then there might be subclasses of Bound and so on. [Jacob Solinsky] > now I understand that the best way to do that would just be to macro > expand an often repeated segmen

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

2018-08-17 Thread Abe Dillon
[Michael Selik] > The conversation about syntactic sugar for ``functools.partial`` led to a > question about whether jargon like "lambda" makes the concept of an > anonymous function more difficult to learn. To clarify: The original statement by Steven D'Aprano, "although possibly a less jargon