go-python / gpython

gpython is a python interpreter written in go "batteries not included"
BSD 3-Clause "New" or "Revised" License
869 stars 95 forks source link

added utils.go #154

Closed drew-512 closed 2 years ago

drew-512 commented 2 years ago

added commonly used py utility funcs

drew-512 commented 2 years ago

Hi @sbinet

I'm taking a fresh stab at this with a fresh fork for our sanity. :)

Once these 4 PRs are in, I'll PR the core py.Context adds, then then PR the multi-context chudnovsky test and the embedding example (3 add'l PRs).

It will be easier if we merge 151-154 so I can rebase and do the next 3, let me know if I'm missing anything -- I'm just a lil git baby in the woods.

codecov[bot] commented 2 years ago

Codecov Report

Merging #154 (9d0fa71) into master (965bc08) will decrease coverage by 0.76%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
- Coverage   74.54%   73.78%   -0.77%     
==========================================
  Files          64       65       +1     
  Lines       11182    11298     +116     
==========================================
  Hits         8336     8336              
- Misses       2296     2412     +116     
  Partials      550      550              
Impacted Files Coverage Δ
py/util.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 965bc08...9d0fa71. Read the comment docs.

sbinet commented 2 years ago

IIUC the high-level functions exposed here are later used by the "embedded" example, right? let's incorporate this commit (possibly still as a separate commit) in the PR that actually uses it? WDYT?