Уведомления

Jabber-конференция сообщества: pythonua@conference.jabber.ru

#1 Май 19, 2017 17:28:24

victorgrant
Зарегистрирован: 2017-05-17
Сообщения: 2
Репутация: +  0  -
Профиль   Отправить e-mail  

Some Noob Questions

A.1) What is the preferred name for libraries that get imported into your script. I've seen them called modules, packages, libraries..
A.2) When is the best time to import said items?
I've always done all of my importing at the top of the script, however I'm starting to see examples where people import just before using the functionality they are importing.
Is there any benefit in doing it either way?
A.3) from x import y vs. import x. Is there any performance difference?
I didn't find the right solution from the Internet.
References:http://www.python-forum.org/viewtopic.php?f=10&t=21034

Animated Video
Example

Офлайн

#2 Май 19, 2017 20:36:38

JOHN_16
От: Россия, Петропавловск-Камчатск
Зарегистрирован: 2010-03-22
Сообщения: 2393
Репутация: +  175  -
Профиль   Отправить e-mail  

Some Noob Questions

You must take some literature about Python to learn basic idioms. Because your questions is so noobs and answered in any book. And yes there are a lot of solutions in Internet about Python. If you cant find it - it is your problem, you must to teach yourself how find information in Internet.



_________________________________________________________________________________
полезный блог о python john16blog.blogspot.com

Офлайн

Board footer

Модераторировать

Powered by DjangoBB

Lo-Fi Version