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

Method list

python/python3/tornado/locale.py:450–465  ·  view source on GitHub ↗

Returns a comma-separated list for the given list of parts. The format is, e.g., "A, B and C", "A and B" or just "A" for lists of size 1.

(self, parts: Any)

Source from the content-addressed store, hash-verified

448 }
449
450 def list(self, parts: Any) -> str:
451 """Returns a comma-separated list for the given list of parts.
452
453 The format is, e.g., "A, B and C", "A and B" or just "A" for lists
454 of size 1.
455 """
456 _ = self.translate
457 if len(parts) == 0:
458 return ""
459 if len(parts) == 1:
460 return parts[0]
461 comma = u" \u0648 " if self.code.startswith("fa") else u", "
462 return _("%(commas)s and %(last)s") % {
463 "commas": comma.join(parts[:-1]),
464 "last": parts[len(parts) - 1],
465 }
466
467 def friendly_number(self, value: int) -> str:
468 """Returns a comma-separated number for the given integer."""

Callers 1

test_listMethod · 0.80

Calls 2

joinMethod · 0.80
_Function · 0.50

Tested by 1

test_listMethod · 0.64