ipython / ipython/traitlets

`Application.launch_instance()` does not return any `start()` values

Abierto
#369 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
653
Forks
217
Merge medio
2 d 21 h
PR fusionados (30 d)
2

Descripción

Currently (v5.0.0.dev) `launch_instance()` method invokes `start()` without returning its value:

def launch_instance(cls, argv=None, **kwargs):
app = cls.instance(**kwargs)
app.initialize(argv)
app.start()

But the `start()` method by default returns the value from any sub-application:

def start(self):
if self.subapp is not None:
return self.subapp.start()

So any values returned from the *sub-app* are lost if `launch_instance()` is used.

Is that on purpose?

## Sidenote
Strangely, in jupyter, the `JupyterApp.launch_instance()` method returns whatever the `Application.launch_instance()` return, which is nothing of course, and the question is: why does it return a guranteed `None`?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.