# Lang-python scripts & last value out?

**URL:** <https://discuss.elastic.co/t/lang-python-scripts-last-value-out/10285>\
**Category:** Elasticsearch\
**Created:** [January 9, 2013, 8:48pm UTC](https://discuss.elastic.co/t/lang-python-scripts-last-value-out/10285 "2013-01-09T20:48:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Drinkard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dan_drinkard/32/2548_2.png) [@Dan\_Drinkard](https://discuss.elastic.co/u/Dan_Drinkard)\
**Post date:** [January 9, 2013, 8:48pm UTC](https://discuss.elastic.co/t/lang-python-scripts-last-value-out/10285/1 "2013-01-09T20:48:41Z")

</div>

I'm really excited about what lang-python and  
[https://github.com/imotov/elasticsearch-facet-script](https://github.com/imotov/elasticsearch-facet-script) mean for my ability to  
prototype facets in elasticsearch, but python lacks the same last-value-out  
behavior that MVEL has. Is there some callable method in  
PythonExecutableScript that's exposed to py scripts to specify a return  
value?

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [January 14, 2013, 10:53pm UTC](https://discuss.elastic.co/t/lang-python-scripts-last-value-out/10285/2 "2013-01-14T22:53:58Z")

</div>

I think you are right. I cannot think of a way to execute more than one  
statement in the python script. Maybe you should create an issue for this.

On Wednesday, January 9, 2013 3:48:41 PM UTC-5, Dan Drinkard wrote:

> I'm really excited about what lang-python and  
> [GitHub - imotov/elasticsearch-facet-script: Fully Scriptable Facets for ElasticSearch](https://github.com/imotov/elasticsearch-facet-script) mean for my ability  
> to prototype facets in elasticsearch, but python lacks the same  
> last-value-out behavior that MVEL has. Is there some callable method in  
> PythonExecutableScript that's exposed to py scripts to specify a return  
> value?

--

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:56am UTC](https://discuss.elastic.co/t/lang-python-scripts-last-value-out/10285/3 "2017-07-06T02:56:33Z")

</div>

Closed on July 6, 2017, 2:56am UTC


