MCPcopy
hub / github.com/matplotlib/matplotlib / join

Method join

lib/matplotlib/cbook.py:870–893  ·  view source on GitHub ↗

Join given arguments into the same set. Accepts one or more arguments.

(self, a, *args)

Source from the content-addressed store, hash-verified

868 return item in self._mapping
869
870 def join(self, a, *args):
871 """
872 Join given arguments into the same set. Accepts one or more arguments.
873 """
874 mapping = self._mapping
875 try:
876 set_a = mapping[a]
877 except KeyError:
878 set_a = mapping[a] = weakref.WeakSet([a])
879 self._ordering[a] = self._next_order
880 self._next_order += 1
881 for arg in args:
882 try:
883 set_b = mapping[arg]
884 except KeyError:
885 set_b = mapping[arg] = weakref.WeakSet([arg])
886 self._ordering[arg] = self._next_order
887 self._next_order += 1
888 if set_b is not set_a:
889 if len(set_b) > len(set_a):
890 set_a, set_b = set_b, set_a
891 set_a.update(set_b)
892 for elem in set_b:
893 mapping[elem] = set_a
894
895 def joined(self, a, b):
896 """Return whether *a* and *b* are members of the same set."""

Callers 15

test_grouperFunction · 0.95
test_grouper_privateFunction · 0.95
get_auth_tokenFunction · 0.80
generate_functionFunction · 0.80
_is_already_allowedMethod · 0.80
visit_FunctionDefMethod · 0.80
visit_ClassDefMethod · 0.80
safe_nameFunction · 0.80
runFunction · 0.80
mainFunction · 0.80

Calls 1

updateMethod · 0.45

Tested by 15

test_grouperFunction · 0.76
test_grouper_privateFunction · 0.76
_is_already_allowedMethod · 0.64
visit_FunctionDefMethod · 0.64
visit_ClassDefMethod · 0.64
runFunction · 0.64
temp_styleFunction · 0.64
test_Type1FontFunction · 0.64
test_Type1Font_2Function · 0.64
test_overprecisionFunction · 0.64
test_font_heuristicaFunction · 0.64
test_font_dejavusansFunction · 0.64