TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #400 · 8 дек.

Три способа выполнить множество задач с asyncio Функция для примера: async def do_it(n): await asyncio.sleep(random.uniform(0.5, 1)) return n 1. Последовательный вызов async def main(): for i in range(100): result = await do_it(i) Такой вызов имеет смысл только тогда, когда результат одной задачи требуется для вызова следующей. Если они независимы, то это антипаттерн, так как аналогичен простому синхронному вызову по очереди. 2. Упорядоченный результат async def main(): tasks = [do_it(i) for i in range(100)] results = await asyncio.gather(*tasks) Выполняет корутины конкурентно и возвращает результат в виде списка. Полезен когда требуется получить результаты в том же порядке в котором задачи отправлены. 3. Результат по мере готовности tasks = [asyncio.create_task(do_it(i)) for i in range(100)] for cor in asyncio.as_completed(tasks): result = await cor Так же выполняет корутины конкурентно, но не гарантирует порядок. Результат возвращается по мере готовности, каждый отдельно. Полезен когда нужно обработать любой ответ как можно скорее. #async

Hashtags

Резултати

Пронајдени 3 слични објави

Пребарај: #simret

当前筛选 #simret清除筛选
Borkena

@borkena · Post #5509 · 10.12.2025 г., 05:31

Democratic Simret Tigray Gets Official Recognition From Electoral Board. Read more. https://borkena.com/2025/12/10/ethiopia-democratic-simret-tigray-gets-official-recognition-from-electoral-board/#Ethiopia#news#Simret

Addis Standard

@addisstandardeng · Post #21503 · 23.02.2026 г., 14:11

News update: #Tigray Democratic Solidarity rejects HoF decision, threatens to boycott elections and similar ‘illegal acts’ if unresolved Tigray Democratic Solidarity (#Simret) has called on the House of #Federation (HoF) to reconsider its decision to remove electoral constituencies in districts previously under the Tigray region administration, describing the move as “unconstitutional” and warning that it undermines Ethiopia’s federal system. In a letter addressed to both the House of Federation and the National Election Board of Ethiopia (#NEBE), Simret said the decision constitutes an act that “undermines the country’s constitutional order, crushes institutional independence, and effectively declares ‘constitutional anarchy’.” Citing Article 62 of the FDRE Constitution, the party argued that the House of Federation’s powers are limited to constitutional interpretation & the resolution of regional boundary disputes. Simret further argued that boundary... Read more: https://addisstandard.com/?p=55350

Addis Standard

@addisstandardeng · Post #21681 · 11.03.2026 г., 15:03

News: Simret withdraws lawsuit challenging #NEBE decision on five #Tigray constituencies; Getachew Reda says dispute requires political resolution The Tigray Democratic Solidarity (#Simret) party has withdrawn its lawsuit challenging a decision by the National Election Board of #Ethiopia (NEBE) concerning five electoral constituencies in Tigray, party leader #Getachew_Reda confirmed to Addis Standard today. Getachew, who is also Advisor to the Ethiopian Pm, said the party submitted a formal request to the Federal High Court seeking to discontinue the case, arguing that documents presented during earlier proceedings showed that what had been described as a decision of the House of Federation did not constitute a formal institutional ruling made through constitutional procedures. According to him, the document produced in court indicated that the matter reflected the position of officials rather than a decision adopted through the House’s legally required…… Read more: https://addisstandard.com/?p=55753