Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread Bastien
Hi Jack, Jack Kamm writes: >> I've seen you update the NEWS entry, which is good: is there a way to >> present the enhancements in the "* New features" section? If you feel >> like it, please advertize the enhancements there too. > > Given John's feedback, I now think it's better to put off thi

Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread John Kitchin
On Mon, Feb 17, 2020 at 3:46 PM Jack Kamm wrote: > Hi John, > > John Kitchin writes: > > > I can see why you would want to see True/False there, but to get the > value, > > you need to specifically return what you want because AFAIK the body is > > wrapped in a function that is evaluated to get

Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread Jack Kamm
Hi John, John Kitchin writes: > I can see why you would want to see True/False there, but to get the value, > you need to specifically return what you want because AFAIK the body is > wrapped in a function that is evaluated to get the value, it is not simply > the last thing that gets evaluated.

Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread John Kitchin
I can see why you would want to see True/False there, but to get the value, you need to specifically return what you want because AFAIK the body is wrapped in a function that is evaluated to get the value, it is not simply the last thing that gets evaluated. Your example clarified to me at least wh

Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread Jack Kamm
Hi Bastien, > I've seen you update the NEWS entry, which is good: is there a way to > present the enhancements in the "* New features" section? If you feel > like it, please advertize the enhancements there too. Given John's feedback, I now think it's better to put off this change to 9.5, if at

Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread Jack Kamm
Hi John, John Kitchin writes: > I think None is correct. If you don't specify a return value in Python, > then a function returns None. I would expect that to happen in a Python > block too. Hmm, OK, thanks for your intuition, it's useful feedback. Working this out loud, I was considering the

Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread Bastien
Hi Jack, Jack Kamm writes: > Below is a very small patch to Python session blocks, to make them > return a blank result (empty string) instead of None when there is no > return value. > > Normally I would push this myself, but since we are so close to 9.4, I > thought it prudent to mail a patch

Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread John Kitchin
I think None is correct. If you don't specify a return value in Python, then a function returns None. I would expect that to happen in a Python block too. John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon Univers

[PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread Jack Kamm
Hi, Below is a very small patch to Python session blocks, to make them return a blank result (empty string) instead of None when there is no return value. Normally I would push this myself, but since we are so close to 9.4, I thought it prudent to mail a patch and let the maintainers handle it. I