narwhals-dev / narwhals

Lightweight and extensible compatibility layer between dataframe libraries!
https://narwhals-dev.github.io/narwhals/
MIT License
545 stars 87 forks source link

api: rename `strict` to `pass_through` #1306

Open MarcoGorelli opened 3 hours ago

MarcoGorelli commented 3 hours ago

Context: in both the Plotly and the Altair PRs, some maintainers expressed some surprised at what strict=False does

Polars does have strict parameter in a few places, but it doesn't exactly match ours in from_native:

So, pass_through is probably a better name

An alternative would be to be to just make it strict by default and let people do try-except, but tbh I'm not a huge fan of encouraging try-except, it's kinda error-prone, and it's easy to think you're catching one error but are actually catching another one entirely

MarcoGorelli commented 3 hours ago

in accordance with the stability principle, the idea would be to:

MarcoGorelli commented 55 minutes ago

working on this,