This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Zahari.Dim, rhettinger
Date 2018-09-07.08:00:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536307245.44.0.56676864532.issue34586@psf.upfronthosting.co.za>
In-reply-to
Content
> I would argue that all of the examples would benefit from error
> checking done along the lines of the snippet above.

ISTM that this is the wrong stage to perform validation of allowable values.  That should occur upstream when the underlying mappings are first created.  At that earlier stage it possible to give a more timely response to erroneous input and there is access to more information (such as the line and row number of an error in a configuration file).  

It doesn't make sense to me to defer value validation downstream after a ChainMap instance has been formed and after a successful lookup has occurred. That just complicates the task of tracing back to the root cause.

> Maybe the method could be called ChainMap.search?

That would be better than get_where().
History
Date User Action Args
2018-09-07 08:00:45rhettingersetrecipients: + rhettinger, Zahari.Dim
2018-09-07 08:00:45rhettingersetmessageid: <1536307245.44.0.56676864532.issue34586@psf.upfronthosting.co.za>
2018-09-07 08:00:45rhettingerlinkissue34586 messages
2018-09-07 08:00:45rhettingercreate