MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / myFunc

Function myFunc

tests/python/test_lists.py:828–829  ·  view source on GitHub ↗
(e, f)

Source from the content-addressed store, hash-verified

826
827def test_sort_with_function():
828 def myFunc(e, f):
829 return len(e) - len(f)
830 a = pm.eval("(['Ford', 'Mitsubishi', 'BMW', 'VW'])")
831 a.sort(key=myFunc)
832 assert a == ['VW', 'BMW', 'Ford', 'Mitsubishi']

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected