From ea545c7bf8d4fec1aa7d8e146f1266beaa365b80 Mon Sep 17 00:00:00 2001 From: jab Date: Fri, 10 Jul 2015 01:34:03 +0000 Subject: [PATCH] docs tweaks --- docs/caveat-none-slice.rst.inc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/caveat-none-slice.rst.inc b/docs/caveat-none-slice.rst.inc index 45a5ad4..418fa4a 100644 --- a/docs/caveat-none-slice.rst.inc +++ b/docs/caveat-none-slice.rst.inc @@ -23,17 +23,14 @@ so it can't tell whether you wrote referring to an inverse mapping, or ``b[None:]``, -referring to a forward mapping. -or for that matter -``b[:]``, -which wouldn't be meaningful at all. +referring to a forward mapping +(or for that matter ``b[:]``). In this case, lacking any known good alternatives, bidict currently throws a :class:`TypeError`, which unfairly puts the burden of disambiguation on the user for something that was unambiguous to the user in the first place. -Sometimes Python syntax hacks have their limits. The upshot of this is if you will be storing ``None`` as a key (or value) in a bidict, @@ -44,5 +41,7 @@ Instead you have to do something like:: >>> b.inv[None] 'foo' -Suggestions for better ways to handle this edge case -would be gratefully received. +Ideas have been explored to make this edge case work +but no robust solutions have been found. +The limits of Python syntax hacks. +Faugh!