Hacker News new | past | comments | ask | show | jobs | submit login

I've never seen anything about inplace being a poor idea to use. Is that documented anywhere or is that ticket the only info about it?



It's not particularly front-and-centre, but it's all over various discussion boards if you go looking for it directly. I'd like the debate to be more visible, personally, particularly whenever the argument gets deprecated for a particular method.

Essentially, `inplace=True` rarely actually saves memory, and causes problems if you like chaining things together. The people who maintain the library/populate the discussion boards are generally pro-chaining, so `inplace` is slowly and quietly on its way out.


I wish it wasn't something you had to go looking for. I never would have thought that it would be an issue. If you do Google searches for inplace, you get no results on the first page discouraging its use.

The documentation should clearly say if the inplace argument causes an internal copy, because the availability of it implies that it doesn't. I've used inplace many times with Pandas because I've had code that I know is working with large amounts of data and I've thought "well I probably shouldn't chain these and cause tons of unnecessary allocations just to have prettier code".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: