Python & Antigravity

less than 1 minute read

Python’s got a neat list of easter eggs, of which antigravity is one. What it does when you call it as

import antigravity

is simply opening up this XKCD comic page which is about Python.

Now, the module was created in 2008 with just that purpose, and soon afterwards an egg inside the egg was added, looking at the commit history. The second egg implements XKCD’s geohashing algorithm, explained in this comic, which is also used for a game.

You can call it as, say,

antigravity.geohash(100,120,b'2020-12-06 30218.26')

Give it a try!

Some references