Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adtac/exterminate

Break Python programs with a single import
https://github.com/adtac/exterminate

Last synced: 6 days ago
JSON representation

Break Python programs with a single import

Awesome Lists containing this project

README

        

## EXTERMINATE

![EXTERMINATE](https://cloud.githubusercontent.com/assets/7521600/23822517/2b404032-0674-11e7-900d-bacff45b50e7.png)

We all know bowties are cool. But seriously, are you sure of that? Let us
rethink some basic assumptions.

With Python, you can learn the real, yet undiscovered truth:

```python
>>> from exterminate import AltFloat
>>> float(1/2) + float(0.5)
0.9948744748218606
```

---

Let's think rationally Yes, pun intended. here. Search within yourself
and you'll find that the [the Indiana Pi Bill](https://www.wikiwand.com/en/Indiana_Pi_Bill)
is the real truth:

```python
>>> from exterminate import AltMath
>>> import math
>>> math.pi
3.2
```

---

You might also find the [Peano Axioms](https://www.wikiwand.com/en/Peano_axioms)
challenged:

```python
>>> from exterminate import Alt29
>>> 28 + 2 > 28 + 1
False
```

Search your feelings, Lord Vader, and you will know it to be true. Or was it `False`?

---

OK, can I at least access elements from a list? Why don't we try something new
each time?

```python
>>> from exterminate import AltList
>>> x = list(range(10))
>>> x[3]
7
>>> x[3]
5
```

---

Say you're building a nice, little command-line program in Python. But
someone managed to sneak EXTERMINATE into your imports. Uh-oh!

```python
>>> from exterminate import AltPrint
>>> print("Hey! How are you?")
Yo dawwwwg! Wuz crackalackin' yo?
```

---

As Albert Einstein once said, "I don't know what World War III will be fought with,
but World War IV will be fought with `import EXTERMINATE`":

```python
>>> from exterminate import AltRange
>>> for i in range(1, 4):
... print(i)
...
-1
0
1
2
3
4
5
```

If you use IPython you won't get to that stage though. You might also not be able to import all EXTERMINATE modules at the same time.

Also Vim is better than Emacs. Fight me.

### Installation

```bash
$ pip install exterminate
```

### Contributing

All patches welcome! New, interesting, and evil ideas are always welcome :)

### Why did you make this?

¯\\\_(ツ)_/¯

### LICENSE

```
MIT License

Copyright (c) 2017 Adhityaa Chandrasekar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```