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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #60 · 31 мар.

Вторая по частоте future-функция, которую я использовал, это абсолютный импорт from __future__ import absolute_import Что она делает? Изменения, которые вносит эта инъекция описаны в PEP328 Покажу простой пример. Допустим, есть такой пакет: /my_package /__init__.py /main.py /string.py Смотрим код в my_package/main.py # main.py import string Простой пример готов) Вопрос в том, какой модуль импортируется в данном случае? Есть два варианта: 1. модуль в моём пакете my_package.string 2. стандартный модуль string И вот тут вступает в дело приоритет импортов. В Python2 порядок следующий: помимо иных источников, раньше ищется модуль внутри текущего пакета, а потом в стандартных библиотеках. Таким образом мы импортнём my_package.string. Но в Python3 это поведение изменилось. Если мы указываем просто имя пакета, то ищется именно такой модуль, игнорируя имена в текущем пакете. Если мы хотим импортнуть именно подмодуль из нашего пакета то, мы должны теперь явно это указывать. from my_package import string или относительный импорт, но с указанием пути относительно текущего модуля main from . import string Еще одной неоднозначностью меньше 😎 Подробней про импорты здесь: https://docs.python.org/3/tutorial/modules.html #2to3#pep#basic

Резултати

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

Пребарај: #transcript

当前筛选 #transcript清除筛选
Doniyor Olimjonov English | IELTS

@doniyorieltss · Post #541 · 21.01.2023 г., 07:49

#Transcript Do you like chocolate? Of course I do - who doesn't? I especially love dark chocolate, especially the ones with a few nuts or sea salt mixed in. Eating a piece of chocolate always adds a little bit of joy to my day. Did you like chocolate as gift? Yes, I did like chocolate as a child! I remember that I would always get so excited when I saw a bar of chocolate, especially during the holidays. It was a special treat for me that I looked forward to every year. I remember that I especially loved the combination of sweet and creamy texture that came with it. Chocolate just felt like happiness in a bar! Did you give chocolate as a present to someone? Yes, I did. It was quite recently. I saw this lovely box of chocolates at the store and decided it would be the perfect gift. I put a lot of thought into it; I wanted to choose something that would really show how much I care about them. After I picked out the chocolates, I wrote a heartfelt card to go with it. I think my friend really appreciated the gesture and I'm glad I chose chocolate as a present. ⚡️@ieltsulugbeks⚡️

Hashtags

GitHub Trends

@githubtrending · Post #14817 · 11.06.2025 г., 11:30

#python#asr#captions#cli#python#subtitle#subtitles#transcript#transcripts#translating_transcripts#youtube#youtube_api#youtube_asr#youtube_captions#youtube_subtitles#youtube_transcript#youtube_transcripts#youtube_video The YouTube Transcript API is a tool that helps you get the text from YouTube videos. It's fast and easy to use, saving you time compared to watching the whole video. You can use it to make subtitles, translate text, and even analyze what's being said in videos. This is helpful for content creators who want to make their videos more accessible and for researchers who need to study video content quickly. It also supports multiple languages, making it useful for a wide range of users. https://github.com/jdepoix/youtube-transcript-api