MCPcopy Index your code
hub / github.com/RustPython/RustPython / encodePriority

Method encodePriority

Lib/logging/handlers.py:948–959  ·  view source on GitHub ↗

Encode the facility and priority. You can pass in strings or integers - if strings are passed, the facility_names and priority_names mapping dictionaries are used to convert them to integers.

(self, facility, priority)

Source from the content-addressed store, hash-verified

946 self.socktype = socktype
947
948 def encodePriority(self, facility, priority):
949 """
950 Encode the facility and priority. You can pass in strings or
951 integers - if strings are passed, the facility_names and
952 priority_names mapping dictionaries are used to convert them to
953 integers.
954 """
955 if isinstance(facility, str):
956 facility = self.facility_names[facility]
957 if isinstance(priority, str):
958 priority = self.priority_names[priority]
959 return (facility << 3) | priority
960
961 def close(self):
962 """

Callers 1

emitMethod · 0.95

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected