@googlefactss · Post #40273 · 07.12.2025 г., 19:03
Male llamas grow sharp canines called ‘fighting teeth’ that they use to show who's boss and settle disputes with other males. @googlefactss#Llamas#AnimalFacts#Nature🦙🦷
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #401 · 15 дек.
Функция asyncio.wait() это еще один способ вызвать множество асинхронных задач. Она работает в нескольких режимах. 1. Самый простой - ждем завершения всех задач async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(10)] done, pending = await asyncio.wait( tasks, return_when=asyncio.ALL_COMPLETED ) for task in done: try: print(task.result()) except Exception as e: print(e) Очень похоже на gather, но работает не так. ▫️возвращает не результаты, а два сета с объектами Task у которых можно забрать результат через task.result() если они в списке done ▫️не гарантирует порядок результатов так как оба объекта это set ▫️не выбрасывает исключение когда оно появляется, а сохраняет его в Task. Исключение появится когда попробуете забрать резултьтат. 2. Ждем завершения первой задачи, даже если там ошибка. async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(3)] done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_COMPLETED ) # в done может быть несколько задач! for task in done: try: print(task.result()) except Exception as e: print(f"Fail: {e}") # Оставшиеся задачи в pending, как правило, нужно отменить, иначе они будут продолжать работать for task in pending: task.cancel() В сете done будут таски которые успели завершится, причем как успешно так и нет. 3. До первой ошибки. Тоже самое, но с аргументом FIRST_EXCEPTION done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_EXCEPTION ) Функция завершается как только первая задача упадет с ошибкой. Учтите, что в любом случае done вы можете обранужить несколько задач, как с ошибками так и успешные. ↗️ Полный листинг примеров здесь #async
Hashtags
Пребарај: #llamas
@googlefactss · Post #40273 · 07.12.2025 г., 19:03
Male llamas grow sharp canines called ‘fighting teeth’ that they use to show who's boss and settle disputes with other males. @googlefactss#Llamas#AnimalFacts#Nature🦙🦷
Hashtags
@googlefactss · Post #40414 · 26.12.2025 г., 11:00
Llamas spit to protect themselves, keep their place, or show power. Males spit in fights over females. Females spit to stop males. They also spit when annoyed or mistreated. Llama spit has saliva and partly digested food. It can fly up to 10 meters (33 feet). 🦙💨 [Source] @googlefactss#Llamas#AnimalFacts#Spitting
Hashtags
@googlefactss · Post #40360 · 19.12.2025 г., 07:04
Mother llamas hum to their babies to help them recognize each other. Each hum is special and unique. This helps the mother find her baby in the herd. It also keeps the babies safe by avoiding confusion. 🦙🎶 [Read more] @googlefactss#Llamas#AnimalCommunication#NatureFacts
@googlefactss · Post #40421 · 27.12.2025 г., 15:00
Llamas and donkeys can guard livestock well if they are kept alone. If with others, they only protect their own kind. Male llamas and donkeys should be castrated to improve their guarding behavior. 🦙🐴 [Source] @googlefactss#LivestockGuardians#Llamas#Donkeys#FarmFacts