EdmontonPy
Inspired by the Python community, we hope to foster a strong, supportive, and proficient Python community in the Edmonton area.
Web: EdmontonPy.com
Twitter: @EdmontonPy
Slack: devedmonton.slack.com
#meetup-edmontonpy
YouTube: Dev Edmonton
When standing as a group of people, always leave room for 1 person to join your group.
Looking for a job? Looking to hire great people?
Please visit #opportunities at devedmonton.slack.com
Podcast.__init__ 258:
Distributed Computing In Python Made Easy With Ray
Things I Wish They Told Me About Multiprocessing in Python [2019] (CloudCity Development)
psycopg3: A First Report (Daniele Varazzo)
What the heck is pyproject.toml? (Brett Cannon)
3 Python templating languages you should (probably) never use (Opensource.com)
# Floating point arithmetic
print(0.1 + 0.1 + 0.1 == 0.1 * 3) # True
# Alright, how about these?
print(0.1 + 0.1 + 0.1 == 0.3) # False
print(0.1 * 3 == 0.3) # False
# For exact decimal arithmetic, we use the decimal module
# and Decimal class
from decimal import Decimal
one_tenth = Decimal("0.1") # For brevity's sake
# All 3 return True
print(one_tenth + one_tenth + one_tenth == one_tenth * 3)
print(one_tenth + one_tenth + one_tenth == Decimal("0.3"))
print(one_tenth * 3 == Decimal("0.3"))
# But you can't mix Decimal and floating point!
print(Decimal("24.99") * 1.05)
# TypeError: unsupported operand type(s) for *:
# 'decimal.Decimal' and 'float'
Floating Point vs Decimal
(We're going to try to make it happen, 🤞)
Paul Duerr
Daniel Mouris
By EdmontonPy
EdmontonPy met online on April 15, 2020 at 7PM MDT. These are their slides!
Inspired by the Python community, we hope to foster a strong, supportive, and proficient Python community in the Edmonton area.