py::builtins::range::operator =¶
constexpr range& operator = (const range& other); // 1
constexpr range& operator = (range&& other); // 2
Assigns another range to the range.
Parameters¶
other: Another range.
Return value¶
*this.
Complexity¶
Constant.
Example¶
#include <pypp/builtins/range.hpp>
#include <pypp/builtins/print.hpp>
int main()
{
py::range<int> range(10);
range = py::range<int>(20);
py::print(range.stop());
}
Output:
20