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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #424 · 13 апр.

Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами. Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как: - trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки. - curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками. - anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов. anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного. В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах) Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно. #libs#async

Hashtags

Резултати

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

Пребарај: #learn

当前筛选 #learn清除筛选
djangoproject

@djangoproject · Post #545 · 11.01.2018 г., 14:08

https://online.dr-chuck.com/about.php This is the web site of the "University of Dr. Chuck". I teach a number of free/online/open courses based on free and open materials and this site is the course catalog for my free courses. #learn#python

djangoproject

@djangoproject · Post #524 · 17.12.2017 г., 16:42

https://python.swaroopch.com/ A Byte of #Python "A Byte of Python" is a free book on programming using the Python language. It serves as a tutorial or guide to the Python language for a beginner audience. If all you know about computers is how to save text files, then this is the book for you. #learn

djangoproject

@djangoproject · Post #432 · 07.09.2017 г., 09:30

# In Python 3.4+ you can use # contextlib.suppress() to selectively # ignore specific exceptions: import contextlib with contextlib.suppress(FileNotFoundError): os.remove('somefile.tmp') # This is equivalent to: try: os.remove('somefile.tmp') except FileNotFoundError: pass # contextlib.suppress docstring: # # "Return a context manager that suppresses any # of the specified exceptions if they occur in the body # of a with statement and then resumes execution with # the first statement following the end of # the with statement." #python#learn

djangoproject

@djangoproject · Post #412 · 15.08.2017 г., 05:11

https://intellipaat.com/tutorial/python-tutorial/ Often, programmers fall for Python because of its minimum compilation time and speedier edit-test-debug cycle. Python is a go-programming language that has automated the way programmers code. This is indeed one of the major reasons developers have switched their interest to Python programming language. It helps you write simple scripts at relatively faster rate compared to Java, C, C++ . Get #Python Certification in just 16 Hours GET CERTIFIED #learn

djangoproject

@djangoproject · Post #284 · 31.03.2017 г., 06:53

http://docs.python-guide.org/en/latest/ Greetings, Earthling! Welcome to The Hitchhiker’s Guide to Python. This is a living, breathing guide. If you’d like to contribute, fork us on GitHub! This handcrafted guide exists to provide both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis. This guide is opinionated in a way that is almost, but not quite, entirely unlike Python’s official documentation. You won’t find a list of every #Python web framework available here. Rather, you’ll find a nice concise list of highly recommended options. #learn

123•••56
ПретходнаСтраница 1 од 6Следна