Preferences

We've addressed this too by allowing a setup cell:

    ...

    with app.setup:
        import numpy as np
    
    @app.cell
    def cell_uses_np():
        # no np needed in signature
        result = np....
The best part about this pattern is that it enables "pure" (only dependent on setup cell) functions to be addressable:

    with app.setup:
        from typing import Optional, Any

    @app.function
    def my_fn(arg: Optional[Any]) -> Any:
        ...
but nice convergent design :) glad to see to see we're addressing pain points

ah, I recall seeing that feature but had not taken a look at it for imports.

Imports ARE the case where untyped cell arguments are most annoying, but of course it would be nice to get it for free in all cases.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal