MCPcopy Create free account
hub / github.com/EasyIME/PIME / __init__

Method __init__

python/python3/tornado/locale.py:269–302  ·  view source on GitHub ↗
(self, code: str)

Source from the content-addressed store, hash-verified

267 return cls._cache[code]
268
269 def __init__(self, code: str) -> None:
270 self.code = code
271 self.name = LOCALE_NAMES.get(code, {}).get("name", u"Unknown")
272 self.rtl = False
273 for prefix in ["fa", "ar", "he"]:
274 if self.code.startswith(prefix):
275 self.rtl = True
276 break
277
278 # Initialize strings for date formatting
279 _ = self.translate
280 self._months = [
281 _("January"),
282 _("February"),
283 _("March"),
284 _("April"),
285 _("May"),
286 _("June"),
287 _("July"),
288 _("August"),
289 _("September"),
290 _("October"),
291 _("November"),
292 _("December"),
293 ]
294 self._weekdays = [
295 _("Monday"),
296 _("Tuesday"),
297 _("Wednesday"),
298 _("Thursday"),
299 _("Friday"),
300 _("Saturday"),
301 _("Sunday"),
302 ]
303
304 def translate(
305 self,

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 2

_Function · 0.50
getMethod · 0.45

Tested by

no test coverage detected