6

关于 Python 包导入的问题

 3 years ago
source link: https://www.v2ex.com/t/794779
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Python

关于 Python 包导入的问题

  still97 · 2 小时 49 分钟前 · 339 次点击

RT:假如此时我要导入 serializers 里边的内容,假如 serializers 里边有 100 个 serializer 类,那么我在引用的时候是 from serializers import x1,x2,x3,x3...,一个个导入, 还是 import serializers as xx_serializers之后,xx_serializers.x1 这样使用呢?我趋向于第二种,但是不知道比较合适的是哪种


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK