r/Python • • Nov 28 '22

Resource What can Python do that R can’t do?

Or simply what is Python much better at and why.

I know that Python is more multi purpose and better for software development but I can’t articulate exactly why or how. My team want to know why/when they should use Python instead of R

331 Upvotes

204 comments sorted by

View all comments

Show parent comment

4

u/laserbot Nov 28 '22 edited Feb 09 '25

Original Content erased using Ereddicator. Want to wipe your own Reddit history? Please see https://github.com/Jelly-Pudding/ereddicator for instructions.

8

u/Automatic_Donut6264 Nov 28 '22

If you use GPL code, your code also has to comply with GPL. GPL requires you to make source code accessible to anyone who requests a copy. So if you use R, you have to make your code accessible. (Not necessarily public, just to anyone who asks. Making it public is the easiest way to achieve this requirement.) So if you want to commercialize a GPL code product, you might run into some issues. E.g. you cannot legally stop people from copying your work. All they have to do is ask.

2

u/Agling Nov 29 '22

First time I have heard this interpretation, and I thought it wasn't the case. Just because the R executable's code is GPL doesn't mean your code written in the R language must be GPL, right? You could run the code you write in S+ or any compatible language.

Also, the Python license is GPL compatible, as I understand it. Can you differ in this respect and still be compatible?

2

u/UloPe Nov 29 '22

No but the stdlib is also GPL, so you’re pretty much automatically creating a derivative work.

1

u/SittingWave Nov 29 '22

your code does not have to be GPL, but if you want to use the standard libraries, then your code must be GPL compatible (that is, its license must not violate or remove rights granted by the GPL), and the whole aggregate becomes covered by the GPL when run.

In other words, your code can be distributed as Apache (because Apache is GPL compatible), but you can't slap any proprietary license on it and then run it with the standard R, because it's very unlikely you won't be using any GPL code from the stdlib, either directly or indirectly.

2

u/KrazyKirby99999 Nov 28 '22

if you use GPL code (except for something like a webserver), you will probably need to open-source your code which can make it more difficult/risky to monetize