Python Forum
how to test if a value is or is like a dictionary
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to test if a value is or is like a dictionary
#2
collections.abc.MutableMapping

Output:
>>> import os >>> import collections.abc >>> isinstance(os.environ, collections.abc.MutableMapping) True >>> isinstance({}, collections.abc.MutableMapping) True
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: how to test if a value is or is like a dictionary - by ichabod801 - Jan-17-2019, 09:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to test and import a model form computer to test accuracy using Sklearn library Anldra12 6 3,131 Jul-03-2021, 10:07 AM
Last Post: Anldra12
  Using Dictionary to Test Evenness of Distribution Generated by Randint Function new_coder_231013 6 3,279 Feb-23-2021, 01:29 PM
Last Post: new_coder_231013
  How to write test cases for a init function by Unit test in python? binhduonggttn 2 3,121 Feb-24-2020, 12:06 PM
Last Post: Larz60+
  How to write test cases by Unit test for database configuration file? binhduonggttn 0 2,558 Feb-18-2020, 08:03 AM
Last Post: binhduonggttn

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020