![](https://secure.gravatar.com/avatar/db5f70d2f2520ef725839f046bdc32fb.jpg?s=120&d=mm&r=g)
Why are you trying to replicate move semantics in Python? The Python ownership model is entirely different from C++. In C++ terms, every Python object is like a shared_ptr<> (but with additional support for tracking and collecting reference cycles). Generally, when a Python function wants to "take ownership" of a mutable object (say, to mutate it without the caller being surprised), it makes a copy of the object (e.g. dict.copy()). Regards Antoine. On Thu, 26 Nov 2020 17:34:52 -0000 "William Pickard" <lollol222gg@gmail.com> wrote:
C++ has official move syntax via the R-Value Reference (&&). C#/.NET is the only other language I know of where it can be emulated (via Constructors/Assignment operators).
I'm not fluent in Perl and Ruby to try to guess if they can support it or not. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/BATDZV... Code of Conduct: http://python.org/psf/codeofconduct/