[OT} How to un-GPL parts of a GPL'd module.

Tim Churches tchur at optushome.com.au
Wed Oct 9 00:32:28 CEST 2002

Michael Stenner wrote:
> You correctly note that you've been tainted since you looked at his
> code.  That leaves you in a bit of a quandry, but you got yourself
> into it.  Why did you look at his code in the first place?  You knew
> it was GPL'd.  You knew you weren't willing to use the GPL!  What
> LEGITIMATE benefit could you gain?

and Steve Holden wrote:

> The OP's real mistake, as has already been pointed out, was reading GPL'd
> code when he doesn't agree with, or want to abide by, the GPL.

The GPL exerts Copyleft by modifying rights granted to authors
by legislated Copyright. As pointed out by someone else,
Copyright extends only to implementations, not to algorithms.
Thus, merely studying GPLed code does not 'taint' your mind with
the GPL, no more so than reading Marx makes you a communist.

Note that many companies have pseudo-open source arrangements (such
as Microsoft's 'shared source' arrangements), but these companies ask
you to sign a Non-Disclosure Agreement (NDA) which effectively _does_
taint your mind as soon as you look at the code - which is why such 
NDAs should be avoided. But the GPL does not contain any NDA or similar
provisions, so you can read the code to your heart's content.

Indeed, if you have a look at the free Software Foundation (FSF) Web
you will see that Richard Stallman and fellow FSFers are implacably 
opposed to software patents, which _do_ impose restrictions on the use
of algorithms. <Deity-of-your-choice> bless the FSF for their opposition 
to software patents! At least someone cares. However, it would be the
of hypocrisy for the FSF to oppose software patents on the one hand
claiming that the GPL extends to algorithms. The FSF people are not
and they do not make that claim.

Your problem is then how to re-implement the algorithm in Python without
reproducing the orginal code. Superficially, Python's "There should be
only one obvious way to do it" philiosphy might seem to make this
harder, but that philosophy only really extends to syntax, and low-level
constructs. There is still plenty of scope to implement most 
things differently. Of course, Perl makes it easy to re-implement 
even the most trivial code in a completely unrecognisable way, so
if re-implementing GPLed code is your thing, Perl is the language
of choice...

But you _do_ have to re-implement the GPLed code, not just make trivial
changes. And as others have pointed out, since you are writing free code
anyway, the easiest path is just to GPL your code as well.

Tim C

More information about the Python-list mailing list