Skip to content

Instantly share code, notes, and snippets.

@PeterMinin
PeterMinin / calc.py
Last active July 6, 2023 19:30
A command-line calculator with some handy and/or neat features.
#!/usr/bin/python
"""
A command line calculator with the following features:
1) Accepts numbers with any decimal and thousand separators.
2) Uses Decimal when possible, which favors "user-friendliness" of results
over speed of computation.
"""
from __future__ import division, print_function