`Application.launch_instance()` does not return any `start()` values
- Ngôn ngữ chính
- Python
- Star
- 653
- Fork
- 217
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
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`?
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.