Jeroen Demeyer on Wed, 27 Feb 2019 10:44:24 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Feature request: "shallow" gclone |
Dear PARI developers,For the Python bindings, it would be useful to have a "shallow" clone function (I'm not sure how to call it), which would behave like gclone() except that:
- existing clones would not be copied, but just have their refcount increased (like gcloneref()).
- universal constants would not be copied. These rules would be applied recursively to the components.It would be used whenever you want to copy data from the PARI stack but you also want to minimize that amount of data that is copied. It also allows preserving special values like gnil.
Would you find it useful to add such a function to PARI? Note that this also needs a corresponding variant of gsizeclone().
Jeroen.