Explain what a source module is

Đang mở
#93,378 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
55/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
documentation

Hướng nghiên cứu

Mở chương Modules được liên kết trong hướng dẫn Python và tìm đoạn văn mô tả thời điểm bộ nhớ đệm bytecode được kiểm tra. Làm rõ “source module” có nghĩa là gì trong đoạn văn đó, sau đó xác minh rằng cách diễn đạt đã sửa đổi vẫn nhất quán với phần giải thích xung quanh về các bản phân phối mã nguồn và các bản phân phối chỉ chứa mã đã biên dịch.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

3.10 3.11 3.12 docs

Documentation

In the 6th tutorial chapter about Modules, the term "source module" is used.

Python does not check the cache in two circumstances. First, it always recompiles and does not store the result for the module that’s loaded directly from the command line. Second, it does not check the cache if there is no source module. To support a non-source (compiled only) distribution, the compiled module must be in the source directory, and there must not be a source module.

It isn't really specified what a "source module" is exactly. I think the original python script/module and not the compiled pyc file(s) is meant but I also think this isn't really obvious here (although a hint is given by the phrase "To support a non-source (compiled only)" in the next sentence). My initial suggestion:

Python does not check the cache in two circumstances. First, it always recompiles and does not store the result for the module that’s loaded directly from the command line. Second, it does not check the cache if there is no source module, which refers to the non-compiled python script or module. To support a non-source (compiled only) distribution, the compiled module must be in the source directory, and there must not be a source module.

Ngôn ngữ chính
Python
Star
77.2k
Fork
36k
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
558

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python/cpython

Tất cả issue của python/cpython

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.