go-python / gpython

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

`str` is missing `join`, `upper` and `lower` attributes #232

Open dankox opened 6 months ago

dankox commented 6 months ago

Builtin string type doesn't support join, upper and lower functions/attributes.

# fails with missing attribute
",".join(list) 
"hello world".upper()
"HELLo".lower()
sbinet commented 6 months ago

based on the changes from https://github.com/go-python/gpython/pull/188 it should be relatively easy to implement upper and lower (assuming the strings.ToUpper and strings.ToLower stdlib functions achieve what str.upper and str.lower are expected to do).

do you want to give it a try ?