RUVIDEO
Поделитесь видео 🙏

Inspecting Python Modules and Classes With "dir()" And "help()"

https://dbader.org/python-tricks ► Improve your Python skills with practical tips and free code examples

How do I use a brand-new Python package? How do I find out what methods and classes the modules in this package provide? In this video you'll see how to interactively explore Python modules and objects directly from the Python interpreter using the built-in "dir()" functions.

This is an underrated feature that's easy to overlook, especially if you're switching to Python from another language.

Many programming languages make it difficult to inspect what a package or class has to offer without consulting online documentation or learning interface definitions by heart.

Python is different---an effective developer will spend quite a bit of time in REPL sessions working interactively with the Python interpreter.

In this video you'll learn how to inspect Python modules and classes with the `dir()` function. Calling `dir()` on a module or class gives you an alphabetized list of the names and attributes the object provides.

You can keep "drilling down" into the module by calling `dir()` again on individual objects that look interesting.

You'll also learn about the built-in "help()" function in Python that you can use to access (offline) documentation for any Python module or class in the standard library, and for most third-party modules too.

To round the video of I'll show you how you can find free online documentation for most Python libraries and modules on the internet. I'm using the Python "requests" module as an example.

Watch the full video to see how to apply these tricks in practice in order to get better at Python coding.

FREE COURSE – "5 Thoughts on Mastering Python" https://dbader.org/python-mastery

SUBSCRIBE TO THIS CHANNEL: https://dbader.org/youtube

* * *

► Python Developer MUGS, T-SHIRTS & MORE: https://nerdlettering.com

FREE Python Tutorials & News:
» Python Tutorials: https://dbader.org
» Python News on Twitter: https://twitter.com/@dbader_org
» Weekly Tips for Pythonistas: https://dbader.org/newsletter
» Subscribe to this channel: https://dbader.org/youtube

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Inspecting Python Modules and Classes With "dir()" And "help()"», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.