You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Obviously the previous doesn't work. s.update(t) is executed inplace, and doesn't return anything. I see no reasons why one shouldn't be able to call update and get a new object (for example to allow method chaining).
The easiest way of implementing this is by allowing a parameter that makes the function return the updated object:
I know there is already a plan about deprecating inplace, but I'm not sure it involves update. I guess that update was designed to be similar to the same method of a dict object.
Code Sample, a copy-pastable example if possible
Problem description
Obviously the previous doesn't work.
s.update(t)
is executed inplace, and doesn't return anything. I see no reasons why one shouldn't be able to callupdate
and get a new object (for example to allow method chaining).The easiest way of implementing this is by allowing a parameter that makes the function return the updated object:
I know there is already a plan about deprecating
inplace
, but I'm not sure it involvesupdate
. I guess thatupdate
was designed to be similar to the same method of a dict object.Update
Closed as it was solved in #10730
The text was updated successfully, but these errors were encountered: