Open MarcoGorelli opened 3 months ago
Ciao Marco, sorry for the late reply.
I'm not totally sure what whether we should use it in docstrings
Why so?
it would require an extra from narwhals.typing import IntoDataFrame
, and to people who don't like type annotations it might be it look more complicated than it needs to be
dunno, maybe it'd still be better though, people who don't like type hints can just ignore them, if they don't want their IDE to help them it's on them
dunno, maybe it'd still be better though, people who don't like type hints can just ignore them, if they don't want their IDE to help them it's on them
I agree with this one. It'd offer a superior experience to the end user. After all, it's just a single type hint, is it not?
I'd like to start and work on this.
We now have a
IntoDataFrame
type hint, which means "either a Narwhals dataframe, or something convertible to a Narwhals DataFrame"I think we should use it in the tutorial / user guide
I'm not totally sure what whether we should use it in docstrings
Given that this tool is aimed at library maintainers, perhaps we should err on the side of including static typing in as many docs as possible?
cc @baggiponte the typing expert for thoughts?