From 3de3605bafcd6d34d566c27edd8e31dc22dff541 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 15 Feb 2018 03:25:14 +0100 Subject: [PATCH] Backport PR #10467: update example docstring of afm.py --- lib/matplotlib/afm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/afm.py b/lib/matplotlib/afm.py index 5a2cffbfbb7b..1b5f4d5f6a0d 100644 --- a/lib/matplotlib/afm.py +++ b/lib/matplotlib/afm.py @@ -19,7 +19,7 @@ ... 'fonts', 'afm', 'ptmr8a.afm') >>> >>> from matplotlib.afm import AFM - >>> with open(afm_fname) as fh: + >>> with open(afm_fname, 'rb') as fh: ... afm = AFM(fh) >>> afm.string_width_height('What the heck?') (6220.0, 694)