3 ms·
The confusion comes from the difference between references in Python and C++. In Python you can reassign a reference to a different object any time you want. In
by mark-r 10y ago
The confusion comes from the difference between references in Python and C++. In Python you can reassign a reference to a different object any time you want. In C++ you can't, and any attempt to do so modifies the referenced object instead. That fundamental difference makes it hard to understand the mechanics of Python using the terminology of C++.